Skip to content

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

feat(tenant): update tenant creation dialog and internationalization

wizardchen6c523144bfeb
diff --git a/frontend/src/components/CreateTenantDialog.vue b/frontend/src/components/CreateTenantDialog.vue
index 502b019eb..a5f6c1675 100644
--- a/frontend/src/components/CreateTenantDialog.vue
+++ b/frontend/src/components/CreateTenantDialog.vue
@@ -1,36 +1,22 @@
<template>
<!-- 自助创建新工作区弹窗。任意已登录用户均可调用 POST /api/v1/tenants
(后端 router 已去掉 g.CrossTenant() 守卫),handler 会自动把当前
- 用户 EnsureOwner 成新租户的 Owner。提交成功后通知父组件,由父组件
- 决定下一步导航(一般是切到新租户)。 -->
- <t-dialog
- :visible="visible"
- :header="$t('tenant.create.dialogTitle')"
- width="480px"
- :on-confirm="handleSubmit"
+ 用户 EnsureOwner 成新租户的 Owner。 -->
+ <t-dialog :visible="visible" :header="$t('tenant.create.dialogTitle')" width="480px" :on-confirm="handleSubmit"
:on-close="handleClose"
:confirm-btn="{ content: $t('tenant.create.submit'), loading: submitting, theme: 'primary' }"
- :cancel-btn="{ content: $t('tenant.create.cancel') }"
- :close-on-overlay-click="!submitting"
- :close-on-esc-keydown="!submitting"
- @update:visible="onVisibleUpdate"
- >
- <t-form ref="formRef" :data="form" :rules="formRules" @submit.prevent>
+ :cancel-btn="{ content: $t('tenant.create.cancel') }" :close-on-overlay-click="!submitting"
+ :close-on-esc-keydown="!submitting" @update:visible="onVisibleUpdate">
+ <p class="create-tenant-tip">{{ $t('tenant.create.dialogSubtitle') }}</p>
+
+ <t-form ref="formRef" :data="form" :rules="formRules" label-align="top" class="create-tenant-form" @submit.prevent>
<t-form-item :label="$t('tenant.create.nameLabel')" name="name">
- <t-input
- v-model="form.name"
- :placeholder="$t('tenant.create.namePlaceholder')"
- :maxlength="128"
- autofocus
- />
+ <t-input v-model="form.name" :placeholder="$t('tenant.create.namePlaceholder')" :maxlength="128" autofocus
+ @keydown.enter="handleSubmit" />
</t-form-item>
<t-form-item :label="$t('tenant.create.descriptionLabel')" name="description">
- <t-textarea
- v-model="form.description"
- :placeholder="$t('tenant.create.descriptionPlaceholder')"
- :maxlength="512"
- :autosize="{ minRows: 2, maxRows: 4 }"
- />
+ <t-textarea v-model="form.description" :placeholder="$t('tenant.create.descriptionPlaceholder')"
+ :maxlength="512" :autosize="{ minRows: 3, maxRows: 5 }" />
</t-form-item>
</t-form>
</t-dialog>
@@ -63,8 +49,7 @@ const form = reactive({
})
// Trim-aware required check:t-input 的 required 不会去空白,全空格也算
-// 通过;这里手动校验 trim 后非空,避免后端因 binding:"required,min=1"
-// 才把请求挡下来。max 长度由 <t-input :maxlength="128"> 在键入时硬限制,
+// 通过;这里手动校验 trim 后非空。max 长度由 :maxlength 在键入时硬限制,
// 所以这里不再重复挂规则(避免与硬限制双重提示)。
const formRules: Record<string, FormRule[]> = {
name: [
@@ -76,14 +61,12 @@ const formRules: Record<string, FormRule[]> = {
],
}
-// 每次打开时重置表单;关闭时不动状态,让动画结束。
watch(
() => props.visible,
(open) => {
if (open) {
form.name = ''
form.description = ''
- // 等 dialog 渲染完成再清掉之前的校验态。
requestAnimationFrame(() => formRef.value?.clearValidate?.())
}
},
@@ -125,3 +108,18 @@ const handleSubmit = async () => {
}
}
</script>
+
+<style lang="less" scoped>
+.create-tenant-tip {
+ margin: 0 0 16px;
+ font-size: 13px;
+ line-height: 1.55;
+ color: var(--td-text-color-secondary);
+}
+
+.create-tenant-form {
+ :deep(.t-form__item):last-child {
+ margin-bottom: 0;
+ }
+}
+</style>
diff --git a/frontend/src/components/UserMenu.vue b/frontend/src/components/UserMenu.vue
index 51a2ffa95..1bc5d3343 100644
--- a/frontend/src/components/UserMenu.vue
+++ b/frontend/src/components/UserMenu.vue
@@ -8,22 +8,14 @@
</div>
<template v-if="!uiStore.sidebarCollapsed">
<div class="user-info">
- <!-- 多租户 / superuser 视角下,左下角入口的两行让位给租户身份信息:
- 第一行 = tenant 名(独占整行,避免被 icon / 徽标挤压成省略号)。
- 第二行 caption = username · [角色图标] 角色名。
- - username 仍露出,让用户切到非 home tenant 后能确认账号;
- - 角色图标与角色名连读,跟切租户子菜单 / dropdown 顶部
- 保持视觉一致(同一份 roleIcon mapping)。
- - 当 tenant 名 === username 时(自创 home tenant 的 fallback 情况)
- 只显示一次 username 避免重复;其它情况都拼出完整 caption。
- 单租户用户没有切租户语义,保留原本的 username + email 布局。 -->
+ <!-- 多租户 / superuser:首行租户名,次行 username · 角色。单租户:昵称 + 邮箱。 -->
<template v-if="showTenantIdentityLine">
<div class="user-tenant-name" :title="activeTenantName">{{ activeTenantName }}</div>
<div class="user-tenant-meta">
<span v-if="userName && userName !== activeTenantName" class="user-tenant-meta-name">{{ userName }}</span>
<span v-if="(userName && userName !== activeTenantName) && currentRoleLabel"
class="user-tenant-meta-sep">·</span>
- <t-icon v-if="currentRoleIcon" :name="currentRoleIcon" size="11px" class="user-tenant-meta-icon" />
+ <t-icon v-if="currentRoleIcon" :name="currentRoleIcon" size="12px" class="user-tenant-meta-icon" />
<span v-if="currentRoleLabel" class="user-tenant-meta-role">{{ currentRoleLabel }}</span>
</div>
</template>
@@ -39,29 +31,35 @@
<!-- 下拉菜单 -->
<Transition name="dropdown">
<div v-if="menuVisible" class="user-dropdown" @click.stop>
- <!-- 顶部「切换租户」入口:单行高密度信息。
- 只展示当前 tenant 名 + 角色 caption,hover 出切租户子菜单。
- 之前堆了 home icon + username + 角色 + chevron 在一起,视觉
- 太密;trigger 按钮里已经有完整的 tenant + home + 角色信息,
- 这里 dropdown 只需要让用户「秒识别这是切租户入口」即可。
- home / 当前 徽标已经在切租户子菜单里 per-row 标注了,
- 顶部入口本身不需要再多一份指示。 -->
- <div v-if="userName" ref="tenantMenuItemRef" class="dropdown-identity" :class="{
+ <!-- 弹出菜单:账号(头像+昵称)/当前租户(名称+权限);底部侧栏样式不改。 -->
+ <div v-if="userName" class="dropdown-user-header">
+ <div class="dropdown-user-avatar">
+ <img v-if="userAvatar" :src="userAvatar" :alt="$t('common.avatar')" />
+ <span v-else class="dropdown-user-avatar-placeholder">{{ userInitial }}</span>
+ </div>
+ <div class="dropdown-user-meta">
+ <div class="dropdown-user-name">{{ userName }}</div>
+ </div>
+ </div>
+
+ <div v-if="userName && !authStore.isLiteMode" ref="tenantMenuItemRef" class="dropdown-tenant-panel" :class="{
'is-open': tenantSubmenuOpen,
'is-clickable': showTenantSwitcher,
}" @mouseenter="showTenantSwitcher && showTenantSubmenu()"
@mouseleave="showTenantSwitcher && scheduleHideTenantSubmenu()">
- <div class="dropdown-identity-main">
- <span class="dropdown-identity-tenant" :title="activeTenantName || userName">
+ <t-icon name="system-sum" class="menu-icon" aria-hidden="true" />
+ <div class="dropdown-tenant-panel-main">
+ <span class="dropdown-tenant-panel-name" :title="activeTenantName || userName">
{{ activeTenantName || userName }}
</span>
- <t-icon v-if="showTenantSwitcher" name="swap" class="dropdown-identity-arrow"
- :title="$t('tenant.switcher.menuLabel')" />
- </div>
- <div v-if="currentRoleLabel" class="dropdown-identity-caption">
- <t-icon v-if="currentRoleIcon" :name="currentRoleIcon" size="12px" class="dropdown-identity-caption-icon" />
- <span>{{ currentRoleLabel }}</span>
+ <div v-if="currentRoleLabel" class="dropdown-tenant-panel-role">
+ <t-icon v-if="currentRoleIcon" :name="currentRoleIcon" size="12px"
+ class="dropdown-tenant-panel-role-icon" />
+ <span>{{ currentRoleLabel }}</span>
+ </div>
</div>
+ <t-icon v-if="showTenantSwitcher" name="swap" class="dropdown-tenant-panel-trail"
+ :title="$t('tenant.switcher.menuLabel')" />
</div>
<div class="menu-divider"></div>
<!-- QuickNav 入口与 Settings 的最低角色对齐:models/websearch/mcp/api
@@ -108,8 +106,7 @@
<t-icon name="setting" class="menu-icon" />
<span>{{ $t('general.allSettings') }}</span>
</div>
- <!-- 切换租户入口已移到顶部身份卡(dropdown-identity-row--tenant),
- 这里不再单独列条目,避免和身份卡里的「当前租户 + 切换」重复。 -->
+ <!-- 切换租户入口在下拉「当前租户」区块 hover;此处仅为分隔线与菜单项。 -->
<div class="menu-divider"></div>
<div class="menu-item" @click="openClawhubSkill">
<span class="menu-icon menu-icon--emoji" role="img" :aria-label="$t('common.clawhubSkill')">🦞</span>
@@ -137,7 +134,7 @@
<t-icon name="logo-github" class="menu-icon" />
<span class="menu-text-with-icon">
<span>{{ $t('common.github') }}</span>
- <t-icon name="star-filled" class="menu-github-star-icon" size="14px" aria-hidden="true" />
+ <t-icon name="star-filled" class="menu-github-star-icon" size="16px" aria-hidden="true" />
<svg class="menu-external-icon" viewBox="0 0 16 16" aria-hidden="true">
<path fill="currentColor"
d="M12.667 8a.667.667 0 0 1 .666.667v4a2.667 2.667 0 0 1-2.666 2.666H4.667a2.667 2.667 0 0 1-2.667-2.666V5.333a2.667 2.667 0 0 1 2.667-2.666h4a.667.667 0 1 1 0 1.333h-4a1.333 1.333 0 0 0-1.333 1.333v7.334A1.333 1.333 0 0 0 4.667 13.333h6a1.333 1.333 0 0 0 1.333-1.333v-4A.667.667 0 0 1 12.667 8Zm2.666-6.667v4a.667.667 0 0 1-1.333 0V3.276l-5.195 5.195a.667.667 0 0 1-.943-.943l5.195-5.195h-2.057a.667.667 0 0 1 0-1.333h4a.667.667 0 0 1 .666.666Z" />
@@ -347,6 +344,7 @@ const showIMSubmenu = () => {
// teleported to body so we can't rely on CSS `left: 100%`.
positionIMSubmenu()
imSubmenuOpen.value = true
+ clampFloatingToViewport('.im-submenu-floating', imSubmenuStyle)
}
const scheduleHideIMSubmenu = () => {
@@ -472,6 +470,7 @@ const showTenantSubmenu = () => {
}
positionTenantSubmenu()
tenantSubmenuOpen.value = true
+ clampFloatingToViewport('.tenant-submenu-floating', tenantSubmenuStyle)
}
const scheduleHideTenantSubmenu = () => {
@@ -486,8 +485,7 @@ const positionTenantSubmenu = () => {
const el = tenantMenuItemRef.value
if (!el) return
const rect = el.getBoundingClientRect()
- const PANEL_WIDTH = 280
- const PANEL_MAX_HEIGHT = 360
+ const PANEL_WIDTH = 264
const GAP = 8
const MARGIN = 8
@@ -496,10 +494,7 @@ const positionTenantSubmenu = () => {
left = Math.max(MARGIN, rect.left - PANEL_WIDTH - GAP)
}
- let top = rect.top - 4
- const maxTop = window.innerHeight - Math.min(PANEL_MAX_HEIGHT, window.innerHeight - MARGIN * 2) - MARGIN
- if (top > maxTop) top = maxTop
- if (top < MARGIN) top = MARGIN
+ const top = Math.max(MARGIN, rect.top)
tenantSubmenuStyle.value = {
left: `${left}px`,
@@ -533,7 +528,6 @@ const positionIMSubmenu = () => {
if (!el) return
const rect = el.getBoundingClientRect()
const PANEL_WIDTH = 300
- const PANEL_MAX_HEIGHT = 520
const GAP = 8
const MARGIN = 8
@@ -543,12 +537,11 @@ const positionIMSubmenu = () => {
left = Math.max(MARGIN, rect.left - PANEL_WIDTH - GAP)
}
- // Align the panel's top with the menu item, then clamp so it doesn't
- // spill past the bottom of the viewport.
- let top = rect.top - 4
- const maxTop = window.innerHeight - Math.min(PANEL_MAX_HEIGHT, window.innerHeight - MARGIN * 2) - MARGIN
- if (top > maxTop) top = maxTop
- if (top < MARGIN) top = MARGIN
+ // Align with the menu item's top; bottom-clamping is done after render
+ // when we know the panel's actual height (see clampSubmenuToViewport).
+ // 之前用 PANEL_MAX_HEIGHT=520 提前 clamp 会把实际只有 ~140px 的面板
+ // 顶到屏幕中上方,与菜单项错开很多。
+ const top = Math.max(MARGIN, rect.top)
imSubmenuStyle.value = {
left: `${left}px`,
@@ -556,6 +549,21 @@ const positionIMSubmenu = () => {
}
}
+// 在面板真正渲染后,按它的实际高度做底部 clamp,避免面板跑出屏幕外。
+const clampFloatingToViewport = (selector: string, target: { value: Record<string, string> }) => {
+ requestAnimationFrame(() => {
+ const panel = document.querySelector(selector) as HTMLElement | null
+ if (!panel) return
+ const MARGIN = 8
+ const h = panel.offsetHeight
+ const currentTop = parseFloat(target.value.top || '0') || 0
+ const maxTop = window.innerHeight - h - MARGIN
+ if (currentTop > maxTop) {
+ target.value = { ...target.value, top: `${Math.max(MARGIN, maxTop)}px` }
+ }
+ })
+}
+
const CHROME_EXTENSION_URL =
'https://chromewebstore.google.com/detail/jpemjbopikggjlmikmclgbmkhhopjdgd?utm_source=item-share-cb'
@@ -673,16 +681,16 @@ onUnmounted(() => {
&--collapsed {
.user-button {
justify-content: center;
- padding: 8px;
+ padding: 6px;
gap: 0;
}
.user-avatar {
- width: 32px;
- height: 32px;
+ width: 28px;
+ height: 28px;
.avatar-placeholder {
- font-size: 13px;
+ font-size: 12px;
}
}
@@ -690,7 +698,8 @@ onUnmounted(() => {
left: calc(100% + 8px);
bottom: 0;
right: auto;
- min-width: 200px;
+ /* 与展开侧栏时下拉可视宽度对齐(aside 宽 260px) */
+ min-width: 260px;
}
}
}
@@ -698,11 +707,8 @@ onUnmounted(() => {
.user-button {
display: flex;
align-items: center;
- // gap 10、左右 padding 12 — 在窄 sidebar 下尽量让文字列拿到更多宽度。
- // 之前 gap:12 / padding:12 16 在长租户名时容易触发单行 ellipsis,这里
- // 收紧后能再给文字列让出 ~14px,绝大多数租户名能完整露出。
- gap: 10px;
- padding: 10px 12px;
+ gap: 8px;
+ padding: 8px 10px;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s;
@@ -718,10 +724,8 @@ onUnmounted(() => {
}
.user-avatar {
- // 与 user-button 的收窄同步:32px 仍能清楚显示首字母 / 头像,且
- // 与 dropdown 里的 tenant 头像 (32px) 视觉一致。
- width: 32px;
- height: 32px;
+ width: 28px;
+ height: 28px;
border-radius: 50%;
overflow: hidden;
flex-shrink: 0;
@@ -739,7 +743,6 @@ onUnmounted(() => {
.avatar-placeholder {
color: var(--td-text-color-anti);
- // 32px 头像下 16px 太挤,14px 更协调;collapsed 态下另有 13px 覆盖。
font-size: 14px;
font-weight: 600;
}
@@ -749,6 +752,10 @@ onUnmounted(() => {
flex: 1;
min-width: 0;
text-align: left;
+ display: flex;
+ flex-direction: column;
+ gap: 2px;
+ justify-content: center;
.user-name {
font-size: 14px;
@@ -767,31 +774,25 @@ onUnmounted(() => {
text-overflow: ellipsis;
}
- // 多租户视角下取代 user-name + user-email 的两行:第一行 tenant 名
- // (独占整行,让长名字也不被截),第二行 home icon(home active 时)
- // + role。视觉权重对齐 user-name + user-email,整体布局高度不变。
- // 长名字单行省略;template 上已挂 `title`,hover 可看到完整名称兜底。
.user-tenant-name {
font-size: 14px;
- font-weight: 500;
+ font-weight: 600;
+ letter-spacing: -0.01em;
color: var(--td-text-color-primary);
- line-height: 1.3;
+ line-height: 1.35;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
- // 第二行 caption 行:username + 角色名(拼接 「user · ✏ 编辑」)。
- // 长 username 优先压缩 / 截断,保留尾部的 role icon + role 名 — 用户
- // 「我现在的角色」比 username 更高频要看清。
.user-tenant-meta {
display: flex;
align-items: center;
gap: 4px;
- margin-top: 1px;
+ margin-top: 0;
min-width: 0;
font-size: 12px;
- line-height: 1.3;
+ line-height: 1.35;
color: var(--td-text-color-secondary);
.user-tenant-meta-name {
@@ -828,9 +829,10 @@ onUnmounted(() => {
.user-dropdown {
position: absolute;
bottom: 100%;
- left: 8px;
- right: 8px;
- margin-bottom: 8px;
+ /* 相对侧栏内容区左右拉满(对齐 aside 的 8px padding) */
+ left: -4px;
+ right: -7px;
+ margin-bottom: 6px;
background: var(--td-bg-color-container);
border-radius: 8px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
@@ -839,16 +841,74 @@ onUnmounted(() => {
z-index: 1000;
}
-// 顶部「切换租户」入口:单块、hover 即可切租户。极简两行 — 主行 tenant
-// 名 + chevron,caption 只放角色。home icon 不在这里出现(trigger 按钮
-// 已经画了一份;切租户子菜单里 per-row 也会标注 home),避免顶部入口
-// 多一个图标显得拥挤。
-.dropdown-identity {
+// 下拉顶部 — 账号区(头像 + 昵称)
+.dropdown-user-header {
display: flex;
- flex-direction: column;
- gap: 2px;
- padding: 12px 16px;
+ align-items: center;
+ gap: 10px;
+ padding: 9px 12px;
+ min-width: 0;
+
+ .dropdown-user-avatar {
+ width: 28px;
+ height: 28px;
+ border-radius: 50%;
+ overflow: hidden;
+ flex-shrink: 0;
+ background: linear-gradient(135deg, var(--td-brand-color) 0%, var(--td-brand-color-active) 100%);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+
+ img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ }
+
+ .dropdown-user-avatar-placeholder {
+ color: var(--td-text-color-anti);
+ font-size: 14px;
+ font-weight: 600;
+ }
+ }
+
+ .dropdown-user-meta {
+ flex: 1;
+ min-width: 0;
+ display: flex;
+ flex-direction: column;
+ gap: 0;
+ justify-content: center;
+ }
+
+ .dropdown-user-name {
+ font-size: 14px;
+ font-weight: 500;
+ color: var(--td-text-color-primary);
+ line-height: 1.35;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+}
+
+// 下拉 — 当前工作区:与下方 .menu-item 同款对齐(左 16px 图标槽 + 文案列 + 右侧操作图标)
+.dropdown-tenant-panel {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ padding: 9px 12px;
+ border-top: 1px solid var(--td-component-stroke);
+ background: transparent;
transition: background 0.15s ease;
+ min-width: 0;
+
+ >.menu-icon {
+ font-size: 16px;
+ color: var(--td-text-color-secondary);
+ flex-shrink: 0;
+ }
&.is-clickable {
cursor: pointer;
@@ -857,50 +917,50 @@ onUnmounted(() => {
&.is-open {
background: var(--td-bg-color-container-hover);
- .dropdown-identity-arrow {
- color: var(--td-text-color-secondary);
+ .dropdown-tenant-panel-trail {
+ color: var(--td-brand-color);
}
}
}
- .dropdown-identity-main {
- display: flex;
- align-items: center;
- gap: 6px;
+ .dropdown-tenant-panel-main {
+ flex: 1 1 auto;
min-width: 0;
+ display: flex;
+ flex-direction: column;
+ gap: 1px;
}
- .dropdown-identity-tenant {
- flex: 1;
- min-width: 0;
+ .dropdown-tenant-panel-name {
font-size: 14px;
font-weight: 500;
color: var(--td-text-color-primary);
- line-height: 1.3;
+ line-height: 1.35;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
- .dropdown-identity-arrow {
+ .dropdown-tenant-panel-trail {
flex-shrink: 0;
- font-size: 14px;
+ font-size: 16px;
color: var(--td-text-color-placeholder);
transition: color 0.15s ease;
}
- .dropdown-identity-caption {
+ .dropdown-tenant-panel-role {
display: flex;
align-items: center;
gap: 4px;
font-size: 12px;
+ line-height: 1.35;
color: var(--td-text-color-secondary);
- line-height: 1.3;
+ min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
- .dropdown-identity-caption-icon {
+ .dropdown-tenant-panel-role-icon {
flex-shrink: 0;
color: inherit;
}
@@ -910,8 +970,8 @@ onUnmounted(() => {
.menu-item {
display: flex;
align-items: center;
- gap: 12px;
- padding: 12px 16px;
+ gap: 10px;
+ padding: 9px 12px;
cursor: pointer;
transition: all 0.2s;
font-size: 14px;
@@ -942,7 +1002,7 @@ onUnmounted(() => {
}
.menu-chevron {
- font-size: 14px;
+ font-size: 16px;
color: var(--td-text-color-placeholder);
flex-shrink: 0;
transition: transform 0.15s;
@@ -1055,8 +1115,8 @@ onUnmounted(() => {
}
.menu-external-icon {
- width: 14px;
- height: 14px;
+ width: 16px;
+ height: 16px;
color: var(--td-text-color-disabled);
flex-shrink: 0;
transition: color 0.2s ease;
@@ -1071,7 +1131,13 @@ onUnmounted(() => {
.menu-divider {
height: 1px;
background: var(--td-component-stroke);
- margin: 4px 0;
+ margin: 3px 0;
+}
+
+// 紧跟账号/租户区块后的分隔线:略收紧与上方的留白
+.dropdown-user-header+.menu-divider,
+.dropdown-tenant-panel+.menu-divider {
+ margin-top: 1px;
}
// 下拉动画
@@ -1130,8 +1196,8 @@ onUnmounted(() => {
.tenant-submenu-floating {
position: fixed;
z-index: 1100;
- width: 280px;
- max-height: 360px;
+ width: 264px;
+ max-height: 340px;
display: flex;
flex-direction: column;
background: var(--td-bg-color-container);
@@ -1144,7 +1210,7 @@ onUnmounted(() => {
overflow: hidden;
.tenant-submenu-header {
- padding: 10px 14px 8px;
+ padding: 8px 12px 6px;
font-size: 12px;
font-weight: 600;
color: var(--td-text-color-secondary);
@@ -1153,14 +1219,14 @@ onUnmounted(() => {
.tenant-submenu-list {
overflow-y: auto;
- padding: 6px;
+ padding: 4px;
}
.tenant-submenu-item {
display: flex;
align-items: center;
- gap: 10px;
- padding: 8px 10px;
+ gap: 8px;
+ padding: 7px 8px;
border-radius: 6px;
cursor: pointer;
transition: background 0.15s;
@@ -1181,8 +1247,8 @@ onUnmounted(() => {
}
.tenant-submenu-item-avatar {
- width: 32px;
- height: 32px;
+ width: 28px;
+ height: 28px;
border-radius: 6px;
background: var(--td-bg-color-secondarycontainer);
display: flex;
@@ -1208,7 +1274,7 @@ onUnmounted(() => {
}
.tenant-submenu-item-name {
- font-size: 13px;
+ font-size: 14px;
color: var(--td-text-color-primary);
white-space: nowrap;
overflow: hidden;
@@ -1275,7 +1341,7 @@ onUnmounted(() => {
}
.tenant-submenu-empty {
- padding: 16px 12px;
+ padding: 12px 10px;
text-align: center;
font-size: 12px;
color: var(--td-text-color-placeholder);
@@ -1284,14 +1350,14 @@ onUnmounted(() => {
.tenant-submenu-create {
display: flex;
align-items: center;
- gap: 8px;
- padding: 10px 12px;
- margin: 4px 6px 6px;
+ gap: 6px;
+ padding: 8px 10px;
+ margin: 3px 4px 5px;
border-top: .5px solid var(--td-component-stroke);
border-radius: 6px;
cursor: pointer;
color: var(--td-brand-color);
- font-size: 13px;
+ font-size: 14px;
font-weight: 500;
transition: background 0.15s;
@@ -1300,7 +1366,7 @@ onUnmounted(() => {
}
.tenant-submenu-create-icon {
- font-size: 14px;
+ font-size: 16px;
flex-shrink: 0;
}
diff --git a/frontend/src/i18n/locales/en-US.ts b/frontend/src/i18n/locales/en-US.ts
index d751219ac..670510baf 100755
--- a/frontend/src/i18n/locales/en-US.ts
+++ b/frontend/src/i18n/locales/en-US.ts
@@ -2278,13 +2278,13 @@ export default {
tenant: {
title: 'Tenant Information',
currentTenant: 'Current Tenant',
- switchTenant: 'Switch Tenant',
+ switchTenant: 'Switch workspace',
switcher: {
- menuLabel: 'Switch Tenant',
+ menuLabel: 'Switch workspace',
currentBadge: 'Current',
homeBadge: 'Home',
- homeTooltip: 'Your home tenant',
- empty: 'You only belong to one tenant',
+ homeTooltip: 'Your home workspace',
+ empty: 'You only belong to one workspace',
},
currentChip: {
home: 'Home tenant',
@@ -2345,6 +2345,7 @@ export default {
create: {
action: 'Create new workspace',
dialogTitle: 'Create new workspace',
+ dialogSubtitle: 'A workspace has its own knowledge bases and members. You will become the owner of the new workspace.',
nameLabel: 'Workspace name',
namePlaceholder: 'e.g. My new project',
nameRequired: 'Please enter a workspace name',
diff --git a/frontend/src/i18n/locales/ko-KR.ts b/frontend/src/i18n/locales/ko-KR.ts
index aa157c382..3bec2e1ae 100755
--- a/frontend/src/i18n/locales/ko-KR.ts
+++ b/frontend/src/i18n/locales/ko-KR.ts
@@ -1536,13 +1536,13 @@ export default {
tenant: {
title: "테넌트 정보",
currentTenant: "현재 테넌트",
- switchTenant: "테넌트 전환",
+ switchTenant: "워크스페이스 전환",
switcher: {
- menuLabel: "테넌트 전환",
+ menuLabel: "워크스페이스 전환",
currentBadge: "현재",
homeBadge: "Home",
- homeTooltip: "기본 테넌트",
- empty: "현재 하나의 테넌트에만 속해 있습니다",
+ homeTooltip: "기본 워크스페이스",
+ empty: "현재 하나의 워크스페이스에만 속해 있습니다",
},
currentChip: {
home: "기본 테넌트",
@@ -1602,19 +1602,7 @@ export default {
create: {
action: "새 워크스페이스 만들기",
dialogTitle: "새 워크스페이스 만들기",
- nameLabel: "워크스페이스 이름",
- namePlaceholder: "예: 새 프로젝트",
- nameRequired: "워크스페이스 이름을 입력하세요",
- descriptionLabel: "설명(선택)",
- descriptionPlaceholder: "이 워크스페이스의 용도를 간단히 설명하세요",
- submit: "만들기",
- cancel: "취소",
- success: "워크스페이스가 생성되었습니다",
- failed: "워크스페이스 생성 실패",
- },
- create: {
- action: "새 워크스페이스 만들기",
- dialogTitle: "새 워크스페이스 만들기",
+ dialogSubtitle: "워크스페이스는 자체 지식 베이스와 멤버를 가지며, 사용자가 자동으로 소유자가 됩니다.",
nameLabel: "워크스페이스 이름",
namePlaceholder: "예: 새 프로젝트",
nameRequired: "워크스페이스 이름을 입력하세요",
diff --git a/frontend/src/i18n/locales/ru-RU.ts b/frontend/src/i18n/locales/ru-RU.ts
index 12f11d48c..63d4540ec 100755
--- a/frontend/src/i18n/locales/ru-RU.ts
+++ b/frontend/src/i18n/locales/ru-RU.ts
@@ -1354,13 +1354,13 @@ export default {
tenant: {
title: 'Информация об арендаторе',
currentTenant: 'Текущий арендатор',
- switchTenant: 'Сменить арендатора',
+ switchTenant: 'Переключить рабочее пространство',
switcher: {
- menuLabel: 'Сменить арендатора',
+ menuLabel: 'Переключить рабочее пространство',
currentBadge: 'Текущий',
homeBadge: 'Home',
- homeTooltip: 'Ваш основной арендатор',
- empty: 'Вы состоите только в одном арендаторе',
+ homeTooltip: 'Ваше основное рабочее пространство',
+ empty: 'Вы состоите только в одном рабочем пространстве',
},
currentChip: {
home: 'Основной арендатор',
@@ -1420,19 +1420,7 @@ export default {
create: {
action: 'Создать новое рабочее пространство',
dialogTitle: 'Создать новое рабочее пространство',
- nameLabel: 'Название',
- namePlaceholder: 'Например: Мой новый проект',
- nameRequired: 'Введите название рабочего пространства',
- descriptionLabel: 'Описание (необязательно)',
- descriptionPlaceholder: 'Кратко опишите назначение рабочего пространства',
- submit: 'Создать',
- cancel: 'Отмена',
- success: 'Рабочее пространство создано',
- failed: 'Не удалось создать рабочее пространство',
- },
- create: {
- action: 'Создать новое рабочее пространство',
- dialogTitle: 'Создать новое рабочее пространство',
+ dialogSubtitle: 'У рабочего пространства собственные базы знаний и участники. Вы станете его владельцем.',
nameLabel: 'Название',
namePlaceholder: 'Например: Мой новый проект',
nameRequired: 'Введите название рабочего пространства',
diff --git a/frontend/src/i18n/locales/zh-CN.ts b/frontend/src/i18n/locales/zh-CN.ts
index 519752c7a..ba8f11142 100755
--- a/frontend/src/i18n/locales/zh-CN.ts
+++ b/frontend/src/i18n/locales/zh-CN.ts
@@ -1516,13 +1516,13 @@ export default {
tenant: {
title: "租户信息",
currentTenant: "当前租户",
- switchTenant: "切换租户",
+ switchTenant: "切换工作区",
switcher: {
- menuLabel: "切换租户",
+ menuLabel: "切换工作区",
currentBadge: "当前",
homeBadge: "我的",
- homeTooltip: "我的租户",
- empty: "你目前只属于这一个租户",
+ homeTooltip: "我的工作区",
+ empty: "你目前只属于这一个工作区",
},
currentChip: {
home: "我的租户",
@@ -1582,6 +1582,7 @@ export default {
create: {
action: "创建新工作区",
dialogTitle: "创建新工作区",
+ dialogSubtitle: "工作区拥有独立的知识库与成员,你将自动成为新工作区的所有者。",
nameLabel: "工作区名称",
namePlaceholder: "例如:我的新项目",
nameRequired: "请输入工作区名称",