From 0be4572bd53d5e9535d7dd5c64191156027d08f7 Mon Sep 17 00:00:00 2001 From: wizardchen Date: Wed, 6 May 2026 12:09:10 +0800 Subject: [PATCH] feat(kb-list): group pinned knowledge bases into a labeled section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On the KB list page, pinned items already sort to the top but look identical to the rest, so at a glance you can't tell where the pinned group ends. Add lightweight section headers ("置顶" / "其他") that span the grid when the list transitions from pinned to unpinned, in both the "全部" and "我的" tabs. Shared KBs never enter the pinned group (backend doesn't pin them). No divider line, no backend change — purely a visual grouping on the existing sort order. --- frontend/src/i18n/locales/en-US.ts | 4 ++ frontend/src/i18n/locales/ko-KR.ts | 4 ++ frontend/src/i18n/locales/ru-RU.ts | 4 ++ frontend/src/i18n/locales/zh-CN.ts | 4 ++ .../src/views/knowledge/KnowledgeBaseList.vue | 57 ++++++++++++++++++- 5 files changed, 70 insertions(+), 3 deletions(-) diff --git a/frontend/src/i18n/locales/en-US.ts b/frontend/src/i18n/locales/en-US.ts index 74e67e20..47ba2419 100755 --- a/frontend/src/i18n/locales/en-US.ts +++ b/frontend/src/i18n/locales/en-US.ts @@ -1548,6 +1548,10 @@ export default { unpinSuccess: 'Unpinned', failed: 'Operation failed', }, + sections: { + pinned: 'Pinned', + others: 'Others', + }, messages: { deleted: 'Knowledge base deleted', deleteFailed: 'Failed to delete knowledge base', diff --git a/frontend/src/i18n/locales/ko-KR.ts b/frontend/src/i18n/locales/ko-KR.ts index eaf8ae5d..8d3390ba 100755 --- a/frontend/src/i18n/locales/ko-KR.ts +++ b/frontend/src/i18n/locales/ko-KR.ts @@ -2146,6 +2146,10 @@ export default { unpinSuccess: "고정 해제됨", failed: "작업 실패", }, + sections: { + pinned: "고정됨", + others: "기타", + }, detail: { title: "공유 지식베이스", overview: "개요", diff --git a/frontend/src/i18n/locales/ru-RU.ts b/frontend/src/i18n/locales/ru-RU.ts index ef1a3952..6e98cf36 100755 --- a/frontend/src/i18n/locales/ru-RU.ts +++ b/frontend/src/i18n/locales/ru-RU.ts @@ -1753,6 +1753,10 @@ export default { unpinSuccess: 'Откреплено', failed: 'Операция не удалась' }, + sections: { + pinned: 'Закреплённые', + others: 'Другие' + }, messages: { deleted: 'База знаний удалена', deleteFailed: 'Не удалось удалить базу знаний', diff --git a/frontend/src/i18n/locales/zh-CN.ts b/frontend/src/i18n/locales/zh-CN.ts index c82def07..9ad2ca05 100755 --- a/frontend/src/i18n/locales/zh-CN.ts +++ b/frontend/src/i18n/locales/zh-CN.ts @@ -2119,6 +2119,10 @@ export default { unpinSuccess: "已取消置顶", failed: "操作失败", }, + sections: { + pinned: "置顶", + others: "其他", + }, detail: { title: "共享知识库", overview: "概览", diff --git a/frontend/src/views/knowledge/KnowledgeBaseList.vue b/frontend/src/views/knowledge/KnowledgeBaseList.vue index f6feaaa0..ec01a67f 100644 --- a/frontend/src/views/knowledge/KnowledgeBaseList.vue +++ b/frontend/src/views/knowledge/KnowledgeBaseList.vue @@ -95,8 +95,26 @@
+ +
+ + {{ $t('knowledgeList.sections.pinned') }} +
-