feat: add pinning functionality for knowledge bases

- Introduced a new API endpoint to toggle the pin status of knowledge bases, allowing users to pin important entries to the top of the list.
- Updated the frontend to include UI elements for pinning and unpinning knowledge bases, with corresponding success and error messages.
- Enhanced localization support by adding translations for pinning actions in English, Korean, Russian, and Chinese.
- Modified the database schema to include `is_pinned` and `pinned_at` fields for knowledge bases, enabling persistent pinning status.

These changes improve the organization and accessibility of knowledge bases, enhancing user experience by allowing quick access to prioritized entries.
This commit is contained in:
wizardchen
2026-03-05 12:02:22 +08:00
committed by lyingbug
parent a1c0682aa3
commit 00bf0460cc
14 changed files with 193 additions and 5 deletions
+7
View File
@@ -1173,6 +1173,13 @@ export default {
menu: {
viewDetails: 'View Details',
},
pin: {
pin: 'Pin to Top',
unpin: 'Unpin',
pinSuccess: 'Pinned',
unpinSuccess: 'Unpinned',
failed: 'Operation failed',
},
messages: {
deleted: 'Knowledge base deleted',
deleteFailed: 'Failed to delete knowledge base'
+7
View File
@@ -1603,6 +1603,13 @@ export default {
menu: {
viewDetails: "세부 사항을 확인하세요",
},
pin: {
pin: "상단 고정",
unpin: "고정 해제",
pinSuccess: "상단에 고정됨",
unpinSuccess: "고정 해제됨",
failed: "작업 실패",
},
detail: {
title: "공유 지식베이스",
overview: "개요",
+7
View File
@@ -1045,6 +1045,13 @@ export default {
confirmMessage: 'Удалить базу знаний «{name}»? Отменить действие будет невозможно.',
confirmButton: 'Удалить'
},
pin: {
pin: 'Закрепить',
unpin: 'Открепить',
pinSuccess: 'Закреплено',
unpinSuccess: 'Откреплено',
failed: 'Операция не удалась',
},
messages: {
deleted: 'База знаний удалена',
deleteFailed: 'Не удалось удалить базу знаний'
+7
View File
@@ -1581,6 +1581,13 @@ export default {
menu: {
viewDetails: "查看详情",
},
pin: {
pin: "置顶",
unpin: "取消置顶",
pinSuccess: "已置顶",
unpinSuccess: "已取消置顶",
failed: "操作失败",
},
detail: {
title: "共享知识库",
overview: "概览",