feat(i18n): add "Shared by me" label to localization files
Enhanced localization files for English, Korean, Russian, and Chinese by adding the "Shared by me" label to improve clarity in shared resource sections. This update ensures a more intuitive user experience when navigating shared content across different languages. Refs: #1303
This commit is contained in:
@@ -430,6 +430,7 @@ export default {
|
||||
mine: 'Created by me',
|
||||
tenantReadonly: 'Workspace · View only',
|
||||
tenantOthers: 'Workspace · Other members',
|
||||
sharedByMe: 'Shared by me',
|
||||
sharedEditable: 'Shared with me · Can edit',
|
||||
sharedReadonly: 'Shared with me · View only',
|
||||
},
|
||||
@@ -1628,6 +1629,7 @@ export default {
|
||||
mine: 'Created by me',
|
||||
tenantReadonly: 'Workspace · View only',
|
||||
tenantOthers: 'Workspace · Other members',
|
||||
sharedByMe: 'Shared by me',
|
||||
sharedEditable: 'Shared with me · Can edit',
|
||||
sharedReadonly: 'Shared with me · View only',
|
||||
},
|
||||
|
||||
@@ -1322,6 +1322,7 @@ export default {
|
||||
mine: "내가 만듦",
|
||||
tenantReadonly: "워크스페이스 · 읽기 전용",
|
||||
tenantOthers: "워크스페이스 · 다른 멤버",
|
||||
sharedByMe: "내가 공유한",
|
||||
sharedEditable: "공유받음 · 편집 가능",
|
||||
sharedReadonly: "공유받음 · 읽기 전용",
|
||||
},
|
||||
@@ -2292,6 +2293,7 @@ export default {
|
||||
mine: "내가 만듦",
|
||||
tenantReadonly: "워크스페이스 · 읽기 전용",
|
||||
tenantOthers: "워크스페이스 · 다른 멤버",
|
||||
sharedByMe: "내가 공유한",
|
||||
sharedEditable: "공유받음 · 편집 가능",
|
||||
sharedReadonly: "공유받음 · 읽기 전용",
|
||||
},
|
||||
|
||||
@@ -522,6 +522,7 @@ export default {
|
||||
mine: 'Созданные мной',
|
||||
tenantReadonly: 'Рабочая область · Только просмотр',
|
||||
tenantOthers: 'Рабочая область · Другие участники',
|
||||
sharedByMe: 'Расшарено мной',
|
||||
sharedEditable: 'Доступно мне · Можно редактировать',
|
||||
sharedReadonly: 'Доступно мне · Только просмотр'
|
||||
},
|
||||
@@ -1867,6 +1868,7 @@ export default {
|
||||
mine: 'Созданные мной',
|
||||
tenantReadonly: 'Рабочая область · Только просмотр',
|
||||
tenantOthers: 'Рабочая область · Другие участники',
|
||||
sharedByMe: 'Расшарено мной',
|
||||
sharedEditable: 'Доступно мне · Можно редактировать',
|
||||
sharedReadonly: 'Доступно мне · Только просмотр'
|
||||
},
|
||||
|
||||
@@ -1316,6 +1316,7 @@ export default {
|
||||
mine: "我创建的",
|
||||
tenantReadonly: "本空间 · 仅查看",
|
||||
tenantOthers: "本空间 · 其他成员",
|
||||
sharedByMe: "我共享的",
|
||||
sharedEditable: "共享给我 · 可编辑",
|
||||
sharedReadonly: "共享给我 · 仅查看",
|
||||
},
|
||||
@@ -2268,6 +2269,7 @@ export default {
|
||||
mine: "我创建的",
|
||||
tenantReadonly: "本空间 · 仅查看",
|
||||
tenantOthers: "本空间 · 其他成员",
|
||||
sharedByMe: "我共享的",
|
||||
sharedEditable: "共享给我 · 可编辑",
|
||||
sharedReadonly: "共享给我 · 仅查看",
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="agent-list-container">
|
||||
<ListSpaceSidebar v-if="!authStore.isLiteMode" v-model="spaceSelection" :count-all="allAgentsCount"
|
||||
:count-mine="agents.length" :count-by-org="effectiveSharedCountByOrg" :count-favorites="agentFavoritesCount"
|
||||
:count-recents="agentRecentsCount" hide-all />
|
||||
:count-recents="agentRecentsCount" />
|
||||
<div class="agent-list-content">
|
||||
<div class="header" style="--wails-draggable: drag">
|
||||
<div class="header-title" style="--wails-draggable: drag">
|
||||
@@ -68,8 +68,7 @@
|
||||
:key="agent.isMine ? agent.id : `shared-${agent.share_id}`">
|
||||
<!-- 内置:始终置顶。filteredAgents 在 all 视图里已经把
|
||||
builtin 排到最前;这里只在第一张 builtin 之前打一次标题。 -->
|
||||
<div v-if="spaceSelection === 'all'
|
||||
&& showShareGroupHeaders
|
||||
<div v-if="showShareGroupHeaders
|
||||
&& agent.isMine
|
||||
&& agent.is_builtin
|
||||
&& (index === 0
|
||||
@@ -80,14 +79,14 @@
|
||||
@keydown.space.prevent="toggleAgentSection('builtin')">
|
||||
<t-icon name="app" size="14px" />
|
||||
<span>{{ $t('agent.sections.builtin') }}</span>
|
||||
<span class="agent-section-count">{{ filteredAgentSectionCounts.builtin }}</span>
|
||||
<t-icon class="agent-section-toggle"
|
||||
:name="isAgentSectionCollapsed('builtin') ? 'chevron-right' : 'chevron-down'" size="14px" />
|
||||
</div>
|
||||
<!-- 我创建的:当前 agent 是本租户 + 非内置 + 我亲手创建,且前一张
|
||||
要么不存在、要么不是本租户、要么是内置(builtin → mine 过渡)、
|
||||
要么是同事创建。与 KB 列表对齐。 -->
|
||||
<div v-if="spaceSelection === 'all'
|
||||
&& showShareGroupHeaders
|
||||
<div v-if="showShareGroupHeaders
|
||||
&& agent.isMine
|
||||
&& !agent.is_builtin
|
||||
&& isMyAgent(agent)
|
||||
@@ -100,12 +99,12 @@
|
||||
@keydown.space.prevent="toggleAgentSection('mine')">
|
||||
<t-icon name="user" size="14px" />
|
||||
<span>{{ $t('agent.sections.mine') }}</span>
|
||||
<span class="agent-section-count">{{ filteredAgentSectionCounts.mine }}</span>
|
||||
<t-icon class="agent-section-toggle"
|
||||
:name="isAgentSectionCollapsed('mine') ? 'chevron-right' : 'chevron-down'" size="14px" />
|
||||
</div>
|
||||
<!-- 本空间 · 仅查看 / 其他成员:本租户里非内置且非我创建的同事 agent。 -->
|
||||
<div v-if="spaceSelection === 'all'
|
||||
&& showShareGroupHeaders
|
||||
<div v-if="showShareGroupHeaders
|
||||
&& agent.isMine
|
||||
&& !agent.is_builtin
|
||||
&& !isMyAgent(agent)
|
||||
@@ -118,26 +117,27 @@
|
||||
@keydown.space.prevent="toggleAgentSection('tenantOthers')">
|
||||
<t-icon :name="tenantSectionIconName" size="14px" />
|
||||
<span>{{ $t(tenantSectionLabelKey) }}</span>
|
||||
<span class="agent-section-count">{{ filteredAgentSectionCounts.tenantOthers }}</span>
|
||||
<t-icon class="agent-section-toggle"
|
||||
:name="isAgentSectionCollapsed('tenantOthers') ? 'chevron-right' : 'chevron-down'" size="14px" />
|
||||
</div>
|
||||
<!-- 共享给我 · 可编辑:仅在「全部」视图过渡处显示分组标题 -->
|
||||
<div v-if="spaceSelection === 'all'
|
||||
&& showShareGroupHeaders
|
||||
<div v-if="showShareGroupHeaders
|
||||
&& !agent.isMine
|
||||
&& isSharedAgentEditable((agent as any).permission)
|
||||
&& (index === 0 || filteredAgents[index - 1].isMine)" class="agent-section-header" role="button"
|
||||
tabindex="0" @click="toggleAgentSection('sharedEditable')"
|
||||
@keydown.enter.prevent="toggleAgentSection('sharedEditable')"
|
||||
@keydown.space.prevent="toggleAgentSection('sharedEditable')">
|
||||
<t-icon name="share" size="14px" />
|
||||
<t-icon name="usergroup-add" size="14px" />
|
||||
<t-icon name="edit-1" size="12px" class="agent-section-subicon" />
|
||||
<span>{{ $t('agent.sections.sharedEditable') }}</span>
|
||||
<span class="agent-section-count">{{ filteredAgentSectionCounts.sharedEditable }}</span>
|
||||
<t-icon class="agent-section-toggle"
|
||||
:name="isAgentSectionCollapsed('sharedEditable') ? 'chevron-right' : 'chevron-down'" size="14px" />
|
||||
</div>
|
||||
<!-- 共享给我 · 仅查看 -->
|
||||
<div v-if="spaceSelection === 'all'
|
||||
&& showShareGroupHeaders
|
||||
<div v-if="showShareGroupHeaders
|
||||
&& !agent.isMine
|
||||
&& !isSharedAgentEditable((agent as any).permission)
|
||||
&& (index === 0
|
||||
@@ -146,8 +146,10 @@
|
||||
role="button" tabindex="0" @click="toggleAgentSection('sharedReadonly')"
|
||||
@keydown.enter.prevent="toggleAgentSection('sharedReadonly')"
|
||||
@keydown.space.prevent="toggleAgentSection('sharedReadonly')">
|
||||
<t-icon name="share" size="14px" />
|
||||
<t-icon name="usergroup-add" size="14px" />
|
||||
<t-icon name="browse" size="12px" class="agent-section-subicon" />
|
||||
<span>{{ $t('agent.sections.sharedReadonly') }}</span>
|
||||
<span class="agent-section-count">{{ filteredAgentSectionCounts.sharedReadonly }}</span>
|
||||
<t-icon class="agent-section-toggle"
|
||||
:name="isAgentSectionCollapsed('sharedReadonly') ? 'chevron-right' : 'chevron-down'" size="14px" />
|
||||
</div>
|
||||
@@ -317,6 +319,7 @@
|
||||
@keydown.space.prevent="toggleAgentSection('builtin')">
|
||||
<t-icon name="app" size="14px" />
|
||||
<span>{{ $t('agent.sections.builtin') }}</span>
|
||||
<span class="agent-section-count">{{ mineAgentSectionCounts.builtin }}</span>
|
||||
<t-icon class="agent-section-toggle"
|
||||
:name="isAgentSectionCollapsed('builtin') ? 'chevron-right' : 'chevron-down'" size="14px" />
|
||||
</div>
|
||||
@@ -332,6 +335,7 @@
|
||||
@keydown.space.prevent="toggleAgentSection('mine')">
|
||||
<t-icon name="user" size="14px" />
|
||||
<span>{{ $t('agent.sections.mine') }}</span>
|
||||
<span class="agent-section-count">{{ mineAgentSectionCounts.mine }}</span>
|
||||
<t-icon class="agent-section-toggle"
|
||||
:name="isAgentSectionCollapsed('mine') ? 'chevron-right' : 'chevron-down'" size="14px" />
|
||||
</div>
|
||||
@@ -347,6 +351,7 @@
|
||||
@keydown.space.prevent="toggleAgentSection('tenantOthers')">
|
||||
<t-icon :name="tenantSectionIconName" size="14px" />
|
||||
<span>{{ $t(tenantSectionLabelKey) }}</span>
|
||||
<span class="agent-section-count">{{ mineAgentSectionCounts.tenantOthers }}</span>
|
||||
<t-icon class="agent-section-toggle"
|
||||
:name="isAgentSectionCollapsed('tenantOthers') ? 'chevron-right' : 'chevron-down'" size="14px" />
|
||||
</div>
|
||||
@@ -495,6 +500,17 @@
|
||||
</div>
|
||||
<div v-else-if="spaceSelectionOrgId && sortedSpaceAgentsList.length > 0" class="agent-card-wrap">
|
||||
<template v-for="(shared, index) in sortedSpaceAgentsList" :key="'shared-' + shared.share_id">
|
||||
<!-- 我共享的:当前用户共享进本空间的智能体,只在首条 is_mine 上挂标题 -->
|
||||
<div v-if="showShareGroupHeaders && shared.is_mine && index === 0" class="agent-section-header"
|
||||
role="button" tabindex="0" @click="toggleAgentSection('sharedByMe')"
|
||||
@keydown.enter.prevent="toggleAgentSection('sharedByMe')"
|
||||
@keydown.space.prevent="toggleAgentSection('sharedByMe')">
|
||||
<t-icon name="share" size="14px" />
|
||||
<span>{{ $t('agent.sections.sharedByMe') }}</span>
|
||||
<span class="agent-section-count">{{ spaceAgentSectionCounts.sharedByMe }}</span>
|
||||
<t-icon class="agent-section-toggle"
|
||||
:name="isAgentSectionCollapsed('sharedByMe') ? 'chevron-right' : 'chevron-down'" size="14px" />
|
||||
</div>
|
||||
<!-- 共享给我 · 可编辑:首次从 is_mine 进入共享 + editable -->
|
||||
<div v-if="showShareGroupHeaders
|
||||
&& !shared.is_mine
|
||||
@@ -503,8 +519,10 @@
|
||||
tabindex="0" @click="toggleAgentSection('sharedEditable')"
|
||||
@keydown.enter.prevent="toggleAgentSection('sharedEditable')"
|
||||
@keydown.space.prevent="toggleAgentSection('sharedEditable')">
|
||||
<t-icon name="share" size="14px" />
|
||||
<t-icon name="usergroup-add" size="14px" />
|
||||
<t-icon name="edit-1" size="12px" class="agent-section-subicon" />
|
||||
<span>{{ $t('agent.sections.sharedEditable') }}</span>
|
||||
<span class="agent-section-count">{{ spaceAgentSectionCounts.sharedEditable }}</span>
|
||||
<t-icon class="agent-section-toggle"
|
||||
:name="isAgentSectionCollapsed('sharedEditable') ? 'chevron-right' : 'chevron-down'" size="14px" />
|
||||
</div>
|
||||
@@ -518,12 +536,14 @@
|
||||
role="button" tabindex="0" @click="toggleAgentSection('sharedReadonly')"
|
||||
@keydown.enter.prevent="toggleAgentSection('sharedReadonly')"
|
||||
@keydown.space.prevent="toggleAgentSection('sharedReadonly')">
|
||||
<t-icon name="share" size="14px" />
|
||||
<t-icon name="usergroup-add" size="14px" />
|
||||
<t-icon name="browse" size="12px" class="agent-section-subicon" />
|
||||
<span>{{ $t('agent.sections.sharedReadonly') }}</span>
|
||||
<span class="agent-section-count">{{ spaceAgentSectionCounts.sharedReadonly }}</span>
|
||||
<t-icon class="agent-section-toggle"
|
||||
:name="isAgentSectionCollapsed('sharedReadonly') ? 'chevron-right' : 'chevron-down'" size="14px" />
|
||||
</div>
|
||||
<div v-show="!isAgentRowHidden(shared)" class="agent-card shared-agent-card" :class="{
|
||||
<div v-show="!isSpaceAgentCollapsed(shared)" class="agent-card shared-agent-card" :class="{
|
||||
'agent-mode-normal': shared.agent?.config?.agent_mode === 'quick-answer',
|
||||
'agent-mode-agent': shared.agent?.config?.agent_mode === 'smart-reasoning'
|
||||
}" @click="handleSpaceAgentCardClick(shared)">
|
||||
@@ -548,7 +568,6 @@
|
||||
<div v-if="shared.agent?.avatar" class="builtin-avatar agent-emoji">{{ shared.agent.avatar }}</div>
|
||||
<AgentAvatar v-else :name="shared.agent?.name" size="small" />
|
||||
<span class="card-title" :title="shared.agent?.name">{{ shared.agent?.name }}</span>
|
||||
<span v-if="shared.is_mine" class="shared-by-me-badge">{{ $t('listSpaceSidebar.mine') }}</span>
|
||||
</div>
|
||||
<t-popup v-if="!shared.is_mine && authStore.hasRole('admin')"
|
||||
:visible="openMoreAgentId === 'shared-tab-' + shared.share_id" trigger="hover"
|
||||
@@ -1300,7 +1319,7 @@ const tenantSectionIconName = computed(() =>
|
||||
|
||||
// 分组折叠:ephemeral,只在当前会话生效。和 KnowledgeBaseList 共用同一套
|
||||
// 思路——空 Set = 全展开,避免新增分段还得维护默认值。
|
||||
type AgentSectionKey = 'builtin' | 'mine' | 'tenantOthers' | 'sharedEditable' | 'sharedReadonly'
|
||||
type AgentSectionKey = 'builtin' | 'mine' | 'tenantOthers' | 'sharedByMe' | 'sharedEditable' | 'sharedReadonly'
|
||||
const collapsedAgentSections = ref<Set<AgentSectionKey>>(new Set())
|
||||
const isAgentSectionCollapsed = (key: AgentSectionKey) => collapsedAgentSections.value.has(key)
|
||||
const toggleAgentSection = (key: AgentSectionKey) => {
|
||||
@@ -1334,6 +1353,41 @@ const isAgentRowHidden = (item: any): boolean => {
|
||||
return key !== null && isAgentSectionCollapsed(key)
|
||||
}
|
||||
|
||||
// 空间筛选视图(sortedSpaceAgentsList)的条目结构和 filteredAgents 不同:
|
||||
// is_mine=true 表示「我共享给这个空间」,需要独立成段(避免和首页的"我创建的"
|
||||
// 共用一个折叠状态)。is_mine=false 仍按 permission 走 sharedEditable / Readonly。
|
||||
const spaceAgentSectionOf = (shared: any): AgentSectionKey => {
|
||||
if (shared?.is_mine) return 'sharedByMe'
|
||||
return isSharedAgentEditable(shared?.permission) ? 'sharedEditable' : 'sharedReadonly'
|
||||
}
|
||||
const isSpaceAgentCollapsed = (shared: any): boolean => isAgentSectionCollapsed(spaceAgentSectionOf(shared))
|
||||
|
||||
// 各分组卡片数量——和 KB 列表同思路,组标题上展示"(N)",方便折叠后核对。
|
||||
const emptyAgentCounts = (): Record<AgentSectionKey, number> => ({
|
||||
builtin: 0, mine: 0, tenantOthers: 0, sharedByMe: 0, sharedEditable: 0, sharedReadonly: 0,
|
||||
})
|
||||
const filteredAgentSectionCounts = computed<Record<AgentSectionKey, number>>(() => {
|
||||
const c = emptyAgentCounts()
|
||||
filteredAgents.value.forEach(a => {
|
||||
const key = agentSectionOf(a)
|
||||
if (key) c[key]++
|
||||
})
|
||||
return c
|
||||
})
|
||||
const mineAgentSectionCounts = computed<Record<AgentSectionKey, number>>(() => {
|
||||
const c = emptyAgentCounts()
|
||||
sortedMineAgents.value.forEach(a => {
|
||||
const key = agentSectionOf(a)
|
||||
if (key) c[key]++
|
||||
})
|
||||
return c
|
||||
})
|
||||
const spaceAgentSectionCounts = computed<Record<AgentSectionKey, number>>(() => {
|
||||
const c = emptyAgentCounts()
|
||||
sortedSpaceAgentsList.value.forEach(shared => { c[spaceAgentSectionOf(shared)]++ })
|
||||
return c
|
||||
})
|
||||
|
||||
const handleDelete = (agent: AgentWithUI) => {
|
||||
openMoreAgentId.value = null
|
||||
deletingAgent.value = agent
|
||||
@@ -1716,6 +1770,12 @@ defineExpose({
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
// 整行只用来铺背景;点击靠子元素冒泡,避免点到标题右侧空白误折叠。
|
||||
pointer-events: none;
|
||||
|
||||
& > * {
|
||||
pointer-events: auto;
|
||||
}
|
||||
// 同 KB 列表:下滑到当前分组时标题吸顶到滚动容器顶部,box-shadow 向上/
|
||||
// 向下延伸背景以封掉 sticky 边缘的 subpixel 残缝。
|
||||
position: sticky;
|
||||
@@ -1752,6 +1812,25 @@ defineExpose({
|
||||
transition: opacity 0.15s ease;
|
||||
}
|
||||
|
||||
// 共享给我的两个子分组:主图标 usergroup-add 表达"共享"语义,
|
||||
// 子图标 (edit / browse) 紧挨主图标用来区分权限。
|
||||
.agent-section-subicon {
|
||||
margin-left: -4px;
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
// 与 KB 列表口径一致:组里的卡片数量徽标。
|
||||
.agent-section-count {
|
||||
margin-left: 2px;
|
||||
padding: 0 6px;
|
||||
border-radius: 8px;
|
||||
background: var(--td-bg-color-secondarycontainer);
|
||||
color: var(--td-text-color-secondary);
|
||||
font-size: 11px;
|
||||
line-height: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
&:hover .agent-section-toggle {
|
||||
opacity: 1;
|
||||
}
|
||||
@@ -1772,7 +1851,7 @@ defineExpose({
|
||||
|
||||
.agent-card-wrap {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
gap: 12px;
|
||||
grid-template-columns: 1fr;
|
||||
animation: contentFadeIn 0.32s ease-out;
|
||||
}
|
||||
@@ -1804,11 +1883,11 @@ defineExpose({
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
transition: all 0.25s ease;
|
||||
padding: 10px 14px;
|
||||
padding: 12px 14px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 128px;
|
||||
min-height: 128px;
|
||||
height: 136px;
|
||||
min-height: 136px;
|
||||
|
||||
&:hover {
|
||||
border-color: var(--td-brand-color);
|
||||
@@ -1896,7 +1975,7 @@ defineExpose({
|
||||
}
|
||||
|
||||
.card-header {
|
||||
margin-bottom: 4px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
@@ -1905,7 +1984,7 @@ defineExpose({
|
||||
}
|
||||
|
||||
.card-content {
|
||||
margin-bottom: 4px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.card-description {
|
||||
@@ -1966,7 +2045,7 @@ defineExpose({
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
margin-bottom: 4px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.card-header-left {
|
||||
|
||||
@@ -3536,7 +3536,7 @@ async function createNewSession(value: string): Promise<void> {
|
||||
display: grid;
|
||||
// 文档卡片信息量较大(标题 + 摘要 + 标签/类型),保持稍宽的最小列宽,避免一行塞太多导致内容拥挤。
|
||||
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
||||
gap: 10px;
|
||||
gap: 12px;
|
||||
align-content: flex-start;
|
||||
width: 100%;
|
||||
|
||||
@@ -3553,20 +3553,20 @@ async function createNewSession(value: string): Promise<void> {
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 8px 12px 6px;
|
||||
padding: 10px 14px 8px;
|
||||
}
|
||||
|
||||
.card-content-nav {
|
||||
margin-bottom: 6px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.card-bottom {
|
||||
flex-shrink: 0;
|
||||
margin-top: auto;
|
||||
width: 100%;
|
||||
padding: 0 12px;
|
||||
padding: 0 14px;
|
||||
box-sizing: border-box;
|
||||
height: 28px;
|
||||
height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
@@ -3864,7 +3864,7 @@ async function createNewSession(value: string): Promise<void> {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border: 1px solid var(--td-component-border);
|
||||
height: 128px;
|
||||
height: 136px;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
@@ -3916,7 +3916,7 @@ async function createNewSession(value: string): Promise<void> {
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 8px 12px 6px;
|
||||
padding: 10px 14px 8px;
|
||||
}
|
||||
|
||||
.card-analyze {
|
||||
@@ -3948,7 +3948,7 @@ async function createNewSession(value: string): Promise<void> {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 0;
|
||||
margin-bottom: 4px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.card-content-title {
|
||||
@@ -4010,9 +4010,9 @@ async function createNewSession(value: string): Promise<void> {
|
||||
.card-bottom {
|
||||
flex-shrink: 0;
|
||||
margin-top: auto;
|
||||
padding: 0 12px;
|
||||
padding: 0 14px;
|
||||
box-sizing: border-box;
|
||||
height: 28px;
|
||||
height: 32px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -102,6 +102,7 @@
|
||||
@keydown.space.prevent="toggleKbSection('pinned')">
|
||||
<t-icon name="pin-filled" size="14px" />
|
||||
<span>{{ $t('knowledgeList.sections.pinned') }}</span>
|
||||
<span class="kb-section-count">{{ filteredKbSectionCounts.pinned }}</span>
|
||||
<t-icon class="kb-section-toggle" :name="isKbSectionCollapsed('pinned') ? 'chevron-right' : 'chevron-down'"
|
||||
size="14px" />
|
||||
</div>
|
||||
@@ -125,6 +126,7 @@
|
||||
@keydown.space.prevent="toggleKbSection('mine')">
|
||||
<t-icon name="user" size="14px" />
|
||||
<span>{{ $t('knowledgeList.sections.mine') }}</span>
|
||||
<span class="kb-section-count">{{ filteredKbSectionCounts.mine }}</span>
|
||||
<t-icon class="kb-section-toggle" :name="isKbSectionCollapsed('mine') ? 'chevron-right' : 'chevron-down'"
|
||||
size="14px" />
|
||||
</div>
|
||||
@@ -145,6 +147,7 @@
|
||||
@keydown.space.prevent="toggleKbSection('tenantOthers')">
|
||||
<t-icon :name="tenantSectionIconName" size="14px" />
|
||||
<span>{{ $t(tenantSectionLabelKey) }}</span>
|
||||
<span class="kb-section-count">{{ filteredKbSectionCounts.tenantOthers }}</span>
|
||||
<t-icon class="kb-section-toggle"
|
||||
:name="isKbSectionCollapsed('tenantOthers') ? 'chevron-right' : 'chevron-down'" size="14px" />
|
||||
</div>
|
||||
@@ -156,8 +159,10 @@
|
||||
tabindex="0" @click="toggleKbSection('sharedEditable')"
|
||||
@keydown.enter.prevent="toggleKbSection('sharedEditable')"
|
||||
@keydown.space.prevent="toggleKbSection('sharedEditable')">
|
||||
<t-icon name="share" size="14px" />
|
||||
<t-icon name="usergroup-add" size="14px" />
|
||||
<t-icon name="edit-1" size="12px" class="kb-section-subicon" />
|
||||
<span>{{ $t('knowledgeList.sections.sharedEditable') }}</span>
|
||||
<span class="kb-section-count">{{ filteredKbSectionCounts.sharedEditable }}</span>
|
||||
<t-icon class="kb-section-toggle"
|
||||
:name="isKbSectionCollapsed('sharedEditable') ? 'chevron-right' : 'chevron-down'" size="14px" />
|
||||
</div>
|
||||
@@ -171,8 +176,10 @@
|
||||
class="kb-section-header" role="button" tabindex="0" @click="toggleKbSection('sharedReadonly')"
|
||||
@keydown.enter.prevent="toggleKbSection('sharedReadonly')"
|
||||
@keydown.space.prevent="toggleKbSection('sharedReadonly')">
|
||||
<t-icon name="share" size="14px" />
|
||||
<t-icon name="usergroup-add" size="14px" />
|
||||
<t-icon name="browse" size="12px" class="kb-section-subicon" />
|
||||
<span>{{ $t('knowledgeList.sections.sharedReadonly') }}</span>
|
||||
<span class="kb-section-count">{{ filteredKbSectionCounts.sharedReadonly }}</span>
|
||||
<t-icon class="kb-section-toggle"
|
||||
:name="isKbSectionCollapsed('sharedReadonly') ? 'chevron-right' : 'chevron-down'" size="14px" />
|
||||
</div>
|
||||
@@ -363,6 +370,7 @@
|
||||
@keydown.space.prevent="toggleKbSection('pinned')">
|
||||
<t-icon name="pin-filled" size="14px" />
|
||||
<span>{{ $t('knowledgeList.sections.pinned') }}</span>
|
||||
<span class="kb-section-count">{{ mineKbSectionCounts.pinned }}</span>
|
||||
<t-icon class="kb-section-toggle" :name="isKbSectionCollapsed('pinned') ? 'chevron-right' : 'chevron-down'"
|
||||
size="14px" />
|
||||
</div>
|
||||
@@ -381,6 +389,7 @@
|
||||
@keydown.space.prevent="toggleKbSection('mine')">
|
||||
<t-icon name="user" size="14px" />
|
||||
<span>{{ $t('knowledgeList.sections.mine') }}</span>
|
||||
<span class="kb-section-count">{{ mineKbSectionCounts.mine }}</span>
|
||||
<t-icon class="kb-section-toggle" :name="isKbSectionCollapsed('mine') ? 'chevron-right' : 'chevron-down'"
|
||||
size="14px" />
|
||||
</div>
|
||||
@@ -397,6 +406,7 @@
|
||||
@keydown.space.prevent="toggleKbSection('tenantOthers')">
|
||||
<t-icon :name="tenantSectionIconName" size="14px" />
|
||||
<span>{{ $t(tenantSectionLabelKey) }}</span>
|
||||
<span class="kb-section-count">{{ mineKbSectionCounts.tenantOthers }}</span>
|
||||
<t-icon class="kb-section-toggle"
|
||||
:name="isKbSectionCollapsed('tenantOthers') ? 'chevron-right' : 'chevron-down'" size="14px" />
|
||||
</div>
|
||||
@@ -511,13 +521,31 @@
|
||||
<div v-else-if="spaceSelectionOrgId && sortedSpaceKbsList.length > 0" class="kb-card-wrap">
|
||||
<template v-for="(shared, index) in sortedSpaceKbsList"
|
||||
:key="'shared-' + (shared.share_id || `agent-${shared.knowledge_base?.id}-${shared.source_from_agent?.agent_id || ''}`)">
|
||||
<!-- 我共享的:本空间下我自己创建并共享进来的条目,只在第一条 is_mine 上挂标题 -->
|
||||
<div v-if="showShareGroupHeaders && shared.is_mine && index === 0" class="kb-section-header"
|
||||
role="button" tabindex="0" @click="toggleKbSection('sharedByMe')"
|
||||
@keydown.enter.prevent="toggleKbSection('sharedByMe')"
|
||||
@keydown.space.prevent="toggleKbSection('sharedByMe')">
|
||||
<t-icon name="share" size="14px" />
|
||||
<span>{{ $t('knowledgeList.sections.sharedByMe') }}</span>
|
||||
<span class="kb-section-count">{{ spaceKbSectionCounts.sharedByMe }}</span>
|
||||
<t-icon class="kb-section-toggle"
|
||||
:name="isKbSectionCollapsed('sharedByMe') ? 'chevron-right' : 'chevron-down'" size="14px" />
|
||||
</div>
|
||||
<!-- 共享给我 · 可编辑:从「我的」首次进入「共享 + 可编辑」 -->
|
||||
<div v-if="showShareGroupHeaders
|
||||
&& !shared.is_mine
|
||||
&& isSharedKbEditable(shared.permission)
|
||||
&& (index === 0 || sortedSpaceKbsList[index - 1].is_mine)" class="kb-section-header">
|
||||
<t-icon name="share" size="14px" />
|
||||
&& (index === 0 || sortedSpaceKbsList[index - 1].is_mine)" class="kb-section-header"
|
||||
role="button" tabindex="0" @click="toggleKbSection('sharedEditable')"
|
||||
@keydown.enter.prevent="toggleKbSection('sharedEditable')"
|
||||
@keydown.space.prevent="toggleKbSection('sharedEditable')">
|
||||
<t-icon name="usergroup-add" size="14px" />
|
||||
<t-icon name="edit-1" size="12px" class="kb-section-subicon" />
|
||||
<span>{{ $t('knowledgeList.sections.sharedEditable') }}</span>
|
||||
<span class="kb-section-count">{{ spaceKbSectionCounts.sharedEditable }}</span>
|
||||
<t-icon class="kb-section-toggle"
|
||||
:name="isKbSectionCollapsed('sharedEditable') ? 'chevron-right' : 'chevron-down'" size="14px" />
|
||||
</div>
|
||||
<!-- 共享给我 · 仅查看:从「可编辑共享 / 我的」首次进入「viewer」 -->
|
||||
<div v-if="showShareGroupHeaders
|
||||
@@ -525,20 +553,24 @@
|
||||
&& !isSharedKbEditable(shared.permission)
|
||||
&& (index === 0
|
||||
|| sortedSpaceKbsList[index - 1].is_mine
|
||||
|| isSharedKbEditable(sortedSpaceKbsList[index - 1].permission))" class="kb-section-header">
|
||||
<t-icon name="share" size="14px" />
|
||||
|| isSharedKbEditable(sortedSpaceKbsList[index - 1].permission))" class="kb-section-header"
|
||||
role="button" tabindex="0" @click="toggleKbSection('sharedReadonly')"
|
||||
@keydown.enter.prevent="toggleKbSection('sharedReadonly')"
|
||||
@keydown.space.prevent="toggleKbSection('sharedReadonly')">
|
||||
<t-icon name="usergroup-add" size="14px" />
|
||||
<t-icon name="browse" size="12px" class="kb-section-subicon" />
|
||||
<span>{{ $t('knowledgeList.sections.sharedReadonly') }}</span>
|
||||
<span class="kb-section-count">{{ spaceKbSectionCounts.sharedReadonly }}</span>
|
||||
<t-icon class="kb-section-toggle"
|
||||
:name="isKbSectionCollapsed('sharedReadonly') ? 'chevron-right' : 'chevron-down'" size="14px" />
|
||||
</div>
|
||||
<div class="kb-card shared-kb-card" :class="{
|
||||
<div v-show="!isSpaceKbCollapsed(shared)" class="kb-card shared-kb-card" :class="{
|
||||
'kb-type-document': (shared.knowledge_base.type || 'document') === 'document',
|
||||
'kb-type-faq': shared.knowledge_base.type === 'faq'
|
||||
}" @click="handleSharedKbClick(shared)">
|
||||
<!-- 卡片头部 -->
|
||||
<div class="card-header">
|
||||
<span class="card-title" :title="shared.knowledge_base.name">{{ shared.knowledge_base.name }}</span>
|
||||
<t-tooltip v-if="shared.is_mine" :content="$t('knowledgeList.myLabel')" placement="top">
|
||||
<span class="shared-by-me-badge">{{ $t('knowledgeList.myLabel') }}</span>
|
||||
</t-tooltip>
|
||||
<t-tooltip v-if="!shared.is_mine" :content="$t('knowledgeList.menu.viewDetails')" placement="top">
|
||||
<button type="button" class="shared-detail-trigger" @click.stop="openSharedDetail(shared)"
|
||||
:aria-label="$t('knowledgeList.menu.viewDetails')">
|
||||
@@ -1038,7 +1070,7 @@ const tenantSectionIconName = computed(() =>
|
||||
// 分组折叠:ephemeral,只在当前会话里生效,不落 localStorage/服务器。
|
||||
// 之所以走"折叠集合"而不是"展开集合",是因为默认全展开——空 Set
|
||||
// 即表示初始的全展开状态,避免每次新加分段还得回头维护默认值。
|
||||
type KbSectionKey = 'pinned' | 'mine' | 'tenantOthers' | 'sharedEditable' | 'sharedReadonly'
|
||||
type KbSectionKey = 'pinned' | 'mine' | 'tenantOthers' | 'sharedByMe' | 'sharedEditable' | 'sharedReadonly'
|
||||
const collapsedKbSections = ref<Set<KbSectionKey>>(new Set())
|
||||
const isKbSectionCollapsed = (key: KbSectionKey) => collapsedKbSections.value.has(key)
|
||||
const toggleKbSection = (key: KbSectionKey) => {
|
||||
@@ -1066,6 +1098,35 @@ const kbSectionOf = (kb: any): KbSectionKey => {
|
||||
return isSharedKbEditable(kb?.permission) ? 'sharedEditable' : 'sharedReadonly'
|
||||
}
|
||||
|
||||
// 空间筛选视图(sortedSpaceKbsList)的条目结构与上面不同:is_mine 直接标识
|
||||
// 「我共享出来的」,其余按 permission 走 sharedEditable / sharedReadonly。
|
||||
const spaceKbSectionOf = (shared: any): KbSectionKey => {
|
||||
if (shared?.is_mine) return 'sharedByMe'
|
||||
return isSharedKbEditable(shared?.permission) ? 'sharedEditable' : 'sharedReadonly'
|
||||
}
|
||||
const isSpaceKbCollapsed = (shared: any): boolean => isKbSectionCollapsed(spaceKbSectionOf(shared))
|
||||
|
||||
// 每个分组里实际有多少张卡片——直接把分组判定函数复用一遍。组标题上展示
|
||||
// "(N)" 让用户一眼知道折叠后会藏掉多少,也方便核对筛选结果。
|
||||
const emptyKbCounts = (): Record<KbSectionKey, number> => ({
|
||||
pinned: 0, mine: 0, tenantOthers: 0, sharedByMe: 0, sharedEditable: 0, sharedReadonly: 0,
|
||||
})
|
||||
const filteredKbSectionCounts = computed<Record<KbSectionKey, number>>(() => {
|
||||
const c = emptyKbCounts()
|
||||
filteredKnowledgeBases.value.forEach(kb => { c[kbSectionOf(kb)]++ })
|
||||
return c
|
||||
})
|
||||
const mineKbSectionCounts = computed<Record<KbSectionKey, number>>(() => {
|
||||
const c = emptyKbCounts()
|
||||
sortedMineKbs.value.forEach(kb => { c[kbSectionOf(kb)]++ })
|
||||
return c
|
||||
})
|
||||
const spaceKbSectionCounts = computed<Record<KbSectionKey, number>>(() => {
|
||||
const c = emptyKbCounts()
|
||||
sortedSpaceKbsList.value.forEach(shared => { c[spaceKbSectionOf(shared)]++ })
|
||||
return c
|
||||
})
|
||||
|
||||
// Filtered knowledge bases: 全部 = 我的 + 全部共享;我的 = 仅我的
|
||||
//
|
||||
// Favorites / Recents reuse the same render path as `all` — they're just
|
||||
@@ -2074,7 +2135,7 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
|
||||
.kb-card-wrap {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
gap: 12px;
|
||||
grid-template-columns: 1fr;
|
||||
animation: contentFadeIn 0.32s ease-out;
|
||||
}
|
||||
@@ -2084,6 +2145,13 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
// 整行只用来铺背景实现 sticky;点击事件靠子元素冒泡触发,避免点到
|
||||
// 标题右侧大片空白时误折叠。键盘 tab/enter 不受 pointer-events 影响。
|
||||
pointer-events: none;
|
||||
|
||||
& > * {
|
||||
pointer-events: auto;
|
||||
}
|
||||
// 下滑时吸顶到滚动容器(.kb-list-main)顶部。z-index 要高于卡片自身的
|
||||
// hover 阴影 / 装饰层;背景必须不透明,否则卡片会从下方透出来。
|
||||
position: sticky;
|
||||
@@ -2129,6 +2197,26 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
transition: opacity 0.15s ease;
|
||||
}
|
||||
|
||||
// 共享给我的两个子分组共用一个主图标 usergroup-add,再用子图标
|
||||
// (edit / browse) 区分权限。子图标向左挤靠主图标,整体读起来还是一个"组"。
|
||||
.kb-section-subicon {
|
||||
margin-left: -4px;
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
// 组里实际有多少张卡片。用 13px 主字号同色降透明度,避免抢标题视觉,
|
||||
// 同时给个轻底色保证在浅色容器上仍可读。
|
||||
.kb-section-count {
|
||||
margin-left: 2px;
|
||||
padding: 0 6px;
|
||||
border-radius: 8px;
|
||||
background: var(--td-bg-color-secondarycontainer);
|
||||
color: var(--td-text-color-secondary);
|
||||
font-size: 11px;
|
||||
line-height: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
&:hover .kb-section-toggle {
|
||||
opacity: 1;
|
||||
}
|
||||
@@ -2144,11 +2232,11 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
transition: all 0.25s ease;
|
||||
padding: 10px 14px;
|
||||
padding: 12px 14px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 128px;
|
||||
min-height: 128px;
|
||||
height: 136px;
|
||||
min-height: 136px;
|
||||
|
||||
&.kb-card-skeleton {
|
||||
cursor: default;
|
||||
@@ -2269,7 +2357,7 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
}
|
||||
|
||||
.card-header {
|
||||
margin-bottom: 4px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
@@ -2278,7 +2366,7 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
}
|
||||
|
||||
.card-content {
|
||||
margin-bottom: 4px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.card-description {
|
||||
@@ -2311,7 +2399,7 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
margin-bottom: 4px;
|
||||
margin-bottom: 6px;
|
||||
|
||||
.card-title {
|
||||
flex: 1;
|
||||
|
||||
@@ -47,7 +47,32 @@
|
||||
|
||||
<!-- 卡片网格 -->
|
||||
<div v-if="filteredOrganizations.length > 0" class="org-card-wrap">
|
||||
<div v-for="(org, index) in filteredOrganizations" :key="org.id" class="org-card"
|
||||
<template v-for="(org, index) in filteredOrganizations" :key="org.id">
|
||||
<!-- 我创建的:仅在 all 视图下出现;created/joined 子视图自身已经
|
||||
隐含了语义,再加标题反而冗余。-->
|
||||
<div v-if="spaceSelection === 'all' && org.is_owner && index === 0" class="org-section-header"
|
||||
role="button" tabindex="0" @click="toggleOrgSection('created')"
|
||||
@keydown.enter.prevent="toggleOrgSection('created')"
|
||||
@keydown.space.prevent="toggleOrgSection('created')">
|
||||
<t-icon name="user" size="14px" />
|
||||
<span>{{ $t('organization.createdByMe') }}</span>
|
||||
<span class="org-section-count">{{ orgSectionCounts.created }}</span>
|
||||
<t-icon class="org-section-toggle"
|
||||
:name="isOrgSectionCollapsed('created') ? 'chevron-right' : 'chevron-down'" size="14px" />
|
||||
</div>
|
||||
<!-- 我加入的:第一张非 owner 卡片前打标题(all 视图下) -->
|
||||
<div v-if="spaceSelection === 'all' && !org.is_owner
|
||||
&& (index === 0 || filteredOrganizations[index - 1].is_owner)" class="org-section-header" role="button"
|
||||
tabindex="0" @click="toggleOrgSection('joined')"
|
||||
@keydown.enter.prevent="toggleOrgSection('joined')"
|
||||
@keydown.space.prevent="toggleOrgSection('joined')">
|
||||
<t-icon name="usergroup" size="14px" />
|
||||
<span>{{ $t('organization.joinedByMe') }}</span>
|
||||
<span class="org-section-count">{{ orgSectionCounts.joined }}</span>
|
||||
<t-icon class="org-section-toggle"
|
||||
:name="isOrgSectionCollapsed('joined') ? 'chevron-right' : 'chevron-down'" size="14px" />
|
||||
</div>
|
||||
<div v-show="!isOrgRowHidden(org)" class="org-card"
|
||||
:class="{ 'joined-org': !org.is_owner }" @click="handleCardClick(org)">
|
||||
<!-- 装饰:协作网络感图形 -->
|
||||
<div class="card-decoration">
|
||||
@@ -146,6 +171,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<!-- 空状态(按筛选显示不同文案) -->
|
||||
@@ -757,7 +783,30 @@ const joinedCount = computed(() => organizations.value.filter(o => !o.is_owner).
|
||||
const filteredOrganizations = computed(() => {
|
||||
if (spaceSelection.value === 'created') return organizations.value.filter(o => o.is_owner)
|
||||
if (spaceSelection.value === 'joined') return organizations.value.filter(o => !o.is_owner)
|
||||
return organizations.value
|
||||
// 「全部」视图下把我创建的 owner 排在前面、我加入的排在后面,方便上面的
|
||||
// 分组标题在过渡处一次性打出来——和 KB / Agent 列表口径一致。
|
||||
return [...organizations.value].sort((a, b) => {
|
||||
if (a.is_owner === b.is_owner) return 0
|
||||
return a.is_owner ? -1 : 1
|
||||
})
|
||||
})
|
||||
|
||||
type OrgSectionKey = 'created' | 'joined'
|
||||
const collapsedOrgSections = ref<Set<OrgSectionKey>>(new Set())
|
||||
const isOrgSectionCollapsed = (key: OrgSectionKey) => collapsedOrgSections.value.has(key)
|
||||
const toggleOrgSection = (key: OrgSectionKey) => {
|
||||
const next = new Set(collapsedOrgSections.value)
|
||||
if (next.has(key)) next.delete(key)
|
||||
else next.add(key)
|
||||
collapsedOrgSections.value = next
|
||||
}
|
||||
const orgSectionOf = (org: { is_owner?: boolean }): OrgSectionKey => (org.is_owner ? 'created' : 'joined')
|
||||
const isOrgRowHidden = (org: { is_owner?: boolean }) =>
|
||||
spaceSelection.value === 'all' && isOrgSectionCollapsed(orgSectionOf(org))
|
||||
const orgSectionCounts = computed<Record<OrgSectionKey, number>>(() => {
|
||||
const c: Record<OrgSectionKey, number> = { created: 0, joined: 0 }
|
||||
filteredOrganizations.value.forEach(o => { c[orgSectionOf(o)]++ })
|
||||
return c
|
||||
})
|
||||
|
||||
const emptyStateTitle = computed(() => {
|
||||
@@ -1412,17 +1461,79 @@ onUnmounted(() => {
|
||||
|
||||
.org-card-wrap {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
gap: 12px;
|
||||
grid-template-columns: 1fr;
|
||||
animation: contentFadeIn 0.32s ease-out;
|
||||
}
|
||||
|
||||
// 共享空间分组标题——与 KB / Agent 列表口径完全一致(图标 + 名称 + 数量 + 折叠 chevron)。
|
||||
.org-section-header {
|
||||
grid-column: 1 / -1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
// 整行只用来铺背景;点击靠子元素冒泡,避免点到标题右侧空白误折叠。
|
||||
pointer-events: none;
|
||||
|
||||
& > * {
|
||||
pointer-events: auto;
|
||||
}
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 5;
|
||||
background: var(--td-bg-color-container);
|
||||
box-shadow: 0 -8px 0 0 var(--td-bg-color-container),
|
||||
0 4px 0 0 var(--td-bg-color-container);
|
||||
padding: 6px 4px 6px 0;
|
||||
color: var(--td-text-color-secondary);
|
||||
font-family: var(--app-font-family);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
line-height: 20px;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
outline: none;
|
||||
|
||||
&:hover {
|
||||
color: var(--td-text-color-primary);
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
box-shadow: 0 0 0 2px var(--td-brand-color-focus, rgba(0, 82, 217, 0.2));
|
||||
}
|
||||
|
||||
.t-icon {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.org-section-toggle {
|
||||
margin-left: 4px;
|
||||
opacity: 0.7;
|
||||
transition: opacity 0.15s ease;
|
||||
}
|
||||
|
||||
.org-section-count {
|
||||
margin-left: 2px;
|
||||
padding: 0 6px;
|
||||
border-radius: 8px;
|
||||
background: var(--td-bg-color-secondarycontainer);
|
||||
color: var(--td-text-color-secondary);
|
||||
font-size: 11px;
|
||||
line-height: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
&:hover .org-section-toggle {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.org-card-skeleton {
|
||||
cursor: default;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 128px;
|
||||
min-height: 128px;
|
||||
height: 136px;
|
||||
min-height: 136px;
|
||||
}
|
||||
|
||||
/* 与知识库 / 智能体列表统一:紧凑 + 1px 描边 */
|
||||
@@ -1436,11 +1547,11 @@ onUnmounted(() => {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
|
||||
padding: 10px 14px;
|
||||
padding: 12px 14px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 128px;
|
||||
min-height: 128px;
|
||||
height: 136px;
|
||||
min-height: 136px;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
@@ -1477,7 +1588,7 @@ onUnmounted(() => {
|
||||
.card-header {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
margin-bottom: 4px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
@@ -1488,7 +1599,7 @@ onUnmounted(() => {
|
||||
.card-content {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin-bottom: 4px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.card-bottom {
|
||||
|
||||
Reference in New Issue
Block a user