{{ $t('knowledgeEditor.document.subtitle') }}
@@ -3754,155 +3430,6 @@ async function createNewSession(value: string): Promise{{ $t('knowledgeEditor.faq.subtitle') }}
@@ -963,6 +943,7 @@ import { import * as XLSX from 'xlsx' import Papa from 'papaparse' import FAQTagTooltip from '@/components/FAQTagTooltip.vue' +import KBInfoPopover from '@/components/KBInfoPopover.vue' import { useUIStore } from '@/stores/ui' interface FAQEntry { @@ -1061,36 +1042,6 @@ const canManage = computed(() => { return orgStore.canManageKB(props.kbId, false) }) -// Effective permission: from direct org share list or from GET /knowledge-bases/:id (e.g. agent-visible KB) -const effectiveKBPermission = computed(() => orgStore.getKBPermission(props.kbId) || kbInfo.value?.my_permission || '') - -// Display role label: when accessed via share, surface the share role even -// if the user happens to be the original creator — the active context is -// "viewing through a shared space" and write actions will 403 regardless. -const accessRoleLabel = computed(() => { - if (!isViaShare.value && isOwner.value) return t('knowledgeBase.accessInfo.roleOwner') - const perm = effectiveKBPermission.value - if (perm) return t(`organization.role.${perm}`) - return '--' -}) - -// Permission summary text for current role (mirrors accessRoleLabel rule). -const accessPermissionSummary = computed(() => { - if (!isViaShare.value && isOwner.value) return t('knowledgeBase.accessInfo.permissionOwner') - const perm = effectiveKBPermission.value - if (perm === 'admin') return t('knowledgeBase.accessInfo.permissionAdmin') - if (perm === 'editor') return t('knowledgeBase.accessInfo.permissionEditor') - if (perm === 'viewer') return t('knowledgeBase.accessInfo.permissionViewer') - return '--' -}) - -// Last updated time from kbInfo -const kbLastUpdated = computed(() => { - const raw = kbInfo.value?.updated_at - if (!raw) return null - return formatImportTime(raw) -}) - // FAQ 操作:新建组(新建条目 + 导入) const faqCreateOptions = computed(() => { if (!canEdit.value) return [] @@ -3535,30 +3486,12 @@ watch(() => entries.value.map(e => ({ flex-wrap: wrap; } - .faq-access-meta { - flex-shrink: 0; - } - - .faq-access-meta-inner { + .kb-title-actions { display: inline-flex; align-items: center; gap: 6px; - font-size: 12px; - color: var(--td-text-color-secondary); - cursor: default; - } - - .faq-access-role-tag { flex-shrink: 0; - } - - .faq-access-meta-sep { - color: var(--td-text-color-placeholder); - user-select: none; - } - - .faq-access-meta-text { - white-space: nowrap; + margin-left: 4px; } .faq-breadcrumb {