From 3bb0d6d7639db2ad677224088a1930feda4a3936 Mon Sep 17 00:00:00 2001 From: wizardchen Date: Sun, 17 May 2026 18:17:31 +0800 Subject: [PATCH] feat(i18n): add "leave workspace" functionality in multiple languages Introduced a new "leave workspace" feature with corresponding titles, descriptions, and buttons in English, Korean, Russian, and Chinese. This enhancement improves user experience and clarity in workspace management, allowing users to easily understand the implications of leaving a workspace. Refs: #1303 --- frontend/src/i18n/locales/en-US.ts | 5 + frontend/src/i18n/locales/ko-KR.ts | 5 + frontend/src/i18n/locales/ru-RU.ts | 5 + frontend/src/i18n/locales/zh-CN.ts | 5 + frontend/src/views/settings/TenantInfo.vue | 448 +++++++++++++----- frontend/src/views/settings/TenantMembers.vue | 49 -- 6 files changed, 342 insertions(+), 175 deletions(-) diff --git a/frontend/src/i18n/locales/en-US.ts b/frontend/src/i18n/locales/en-US.ts index 8f59da29..35350b62 100755 --- a/frontend/src/i18n/locales/en-US.ts +++ b/frontend/src/i18n/locales/en-US.ts @@ -2413,6 +2413,11 @@ export default { usageLabel: 'Storage Usage', usageDescription: 'Percentage of storage capacity used' }, + leaveDangerZone: { + title: 'Leave this workspace', + desc: 'Ends your membership in this workspace. You will lose access to its knowledge bases and agents. You can be invited again later.', + button: 'Leave workspace', + }, messages: { fetchFailed: 'Failed to fetch tenant information', networkError: 'Network error, please try again later' diff --git a/frontend/src/i18n/locales/ko-KR.ts b/frontend/src/i18n/locales/ko-KR.ts index a9bc638a..f9fca319 100755 --- a/frontend/src/i18n/locales/ko-KR.ts +++ b/frontend/src/i18n/locales/ko-KR.ts @@ -1666,6 +1666,11 @@ export default { usageLabel: "저장소 사용률", usageDescription: "저장 스페이스의 사용 백분율", }, + leaveDangerZone: { + title: "이 스페이스 나가기", + desc: "현재 스페이스에서 멤버십을 종료합니다. 지식 베이스 및 에이전트에 접근할 수 없게 되며, 이후 초대되면 다시 참여할 수 있습니다.", + button: "스페이스 나가기", + }, messages: { fetchFailed: "테넌트 정보 가져오기 실패", networkError: "네트워크 오류, 나중에 다시 시도해주세요", diff --git a/frontend/src/i18n/locales/ru-RU.ts b/frontend/src/i18n/locales/ru-RU.ts index bce979f8..0ed408ff 100755 --- a/frontend/src/i18n/locales/ru-RU.ts +++ b/frontend/src/i18n/locales/ru-RU.ts @@ -1464,6 +1464,11 @@ export default { usageLabel: 'Использование хранения', usageDescription: 'Процент использованного пространства' }, + leaveDangerZone: { + title: 'Покинуть это рабочее пространство', + desc: 'Завершает ваше членство в этом пространстве. Вы потеряете доступ к базам знаний и агентам. Позже вас можно снова пригласить.', + button: 'Покинуть пространство', + }, messages: { fetchFailed: 'Не удалось получить информацию об арендаторе', networkError: 'Ошибка сети, попробуйте позже' diff --git a/frontend/src/i18n/locales/zh-CN.ts b/frontend/src/i18n/locales/zh-CN.ts index f9f81bdc..e3cca744 100755 --- a/frontend/src/i18n/locales/zh-CN.ts +++ b/frontend/src/i18n/locales/zh-CN.ts @@ -1646,6 +1646,11 @@ export default { usageLabel: "存储使用率", usageDescription: "存储空间的使用百分比", }, + leaveDangerZone: { + title: "退出当前空间", + desc: "终止您在本空间的成员身份。退出后将无法访问本空间的知识库与智能体,之后可被再次邀请加入。", + button: "退出空间", + }, messages: { fetchFailed: "获取空间信息失败", networkError: "网络错误,请稍后重试", diff --git a/frontend/src/views/settings/TenantInfo.vue b/frontend/src/views/settings/TenantInfo.vue index 5d986eec..979ff066 100644 --- a/frontend/src/views/settings/TenantInfo.vue +++ b/frontend/src/views/settings/TenantInfo.vue @@ -20,144 +20,168 @@ - -
- -
-
- -

{{ $t('tenant.details.idDescription') }}

+ +
+
+ +
+
+ +

{{ $t('tenant.details.idDescription') }}

+
+
+ {{ tenantInfo?.id || '-' }} +
-
- {{ tenantInfo?.id || '-' }} -
-
- -
-
- -

{{ $t('tenant.details.nameDescription') }}

-
-
- +
+
+ +

{{ $t('tenant.details.nameDescription') }}

+
+
+ - - -
- - - {{ $t('tenant.details.editNameConfirm') }} - - - {{ $t('tenant.details.editNameCancel') }} + + +
+ + + {{ $t('tenant.details.editNameConfirm') }} + + + {{ $t('tenant.details.editNameCancel') }} + +
+
+
+ + +
+
+ +

{{ $t('tenant.details.descriptionDescription') }}

+
+
+ {{ tenantInfo.description }} +
+
+ + +
+
+ +

{{ $t('tenant.details.businessDescription') }}

+
+
+ {{ tenantInfo.business }} +
+
+ + +
+
+ +

{{ $t('tenant.details.statusDescription') }}

+
+
+ + {{ getStatusText(tenantInfo?.status) }} + +
+
+ + +
+
+ +

{{ $t('tenant.details.createdAtDescription') }}

+
+
+ {{ formatDate(tenantInfo?.created_at) }} +
+
+ + +
+
+ +

{{ $t('tenant.storage.quotaDescription') }}

+
+
+ {{ formatBytes(tenantInfo.storage_quota) }} +
+
+ + +
+
+ +

{{ $t('tenant.storage.usedDescription') }}

+
+
+ {{ formatBytes(tenantInfo.storage_used || 0) }} +
+
+ + +
+
+ +

{{ $t('tenant.storage.usageDescription') }}

+
+
+
+ {{ getUsagePercentage() }}% + +
+
+
+ +
+ +
- - -
-
- -

{{ $t('tenant.details.descriptionDescription') }}

-
-
- {{ tenantInfo.description }} -
-
- - -
-
- -

{{ $t('tenant.details.businessDescription') }}

-
-
- {{ tenantInfo.business }} -
-
- - -
-
- -

{{ $t('tenant.details.statusDescription') }}

-
-
- - {{ getStatusText(tenantInfo?.status) }} - -
-
- - -
-
- -

{{ $t('tenant.details.createdAtDescription') }}

-
-
- {{ formatDate(tenantInfo?.created_at) }} -
-
- - -
-
- -

{{ $t('tenant.storage.quotaDescription') }}

-
-
- {{ formatBytes(tenantInfo.storage_quota) }} -
-
- - -
-
- -

{{ $t('tenant.storage.usedDescription') }}

-
-
- {{ formatBytes(tenantInfo.storage_used || 0) }} -
-
- - -
-
- -

{{ $t('tenant.storage.usageDescription') }}

-
-
-
- {{ getUsagePercentage() }}% - -
-
-
+