feat(tenant): show rich workspace-switch confirmation that survives reload

Replace the lightweight "switch success" message with a richer
NotifyPlugin notification that reports the new workspace name and the
user's role in it. Because the post-switch flow does a hard reload,
the notification is stashed in sessionStorage before navigation and
consumed by App.vue on the next mount, so the toast actually appears
on the destination page with its full 6s duration instead of being
torn down a frame after it is shown.

For the cross-tenant superuser path (TenantSelector), the role line is
omitted when the user has no membership row in the target tenant,
avoiding a misleading empty/raw role value. Role labels are formatted
through the shared useRoleLabel composable so any future role text
change still lives in one place.

i18n keys updated across zh-CN, en-US, ko-KR, ru-RU.
This commit is contained in:
wizardchen
2026-05-18 19:34:06 +08:00
committed by lyingbug
parent c19d3543c8
commit 0655b545be
8 changed files with 83 additions and 10 deletions
+3 -1
View File
@@ -1435,7 +1435,9 @@ export default {
searchPlaceholder: 'Поиск по имени или введите ID арендатора...',
searchHint: 'Поиск по имени или введите ID арендатора напрямую',
noMatch: 'Не найдено подходящих арендаторов',
switchSuccess: 'Арендатор успешно переключен',
switchSuccessTitle: 'Пространство переключено',
switchSuccessContent: 'Вы вошли в «{name}»',
switchSuccessContentWithRole: 'Вы вошли в «{name}» · роль: {role}',
loadTenantsFailed: 'Не удалось загрузить список арендаторов',
loading: 'Загрузка...',
loadMore: 'Загрузить еще',