From 5d90019fd0d211a5e1d347f69ed9f13b018b9c8d Mon Sep 17 00:00:00 2001 From: wizardchen Date: Thu, 5 Mar 2026 13:30:53 +0800 Subject: [PATCH] feat: enhance sidebar functionality and UI responsiveness - Implemented sidebar collapse and expand functionality, allowing users to toggle the sidebar visibility for a more streamlined interface. - Updated the `uiStore` to manage sidebar state, persisting the collapsed state in local storage for user preference. - Enhanced the `menu.vue` and `UserMenu.vue` components to adapt their layout based on the sidebar state, improving usability. - Added corresponding translations for sidebar actions in English, Korean, Russian, and Chinese, ensuring accessibility for diverse users. - Refined CSS styles to support the new sidebar behavior, enhancing overall UI consistency and responsiveness. These changes significantly improve the user experience by providing a more flexible and user-friendly navigation system. --- frontend/src/assets/theme/theme.css | 13 ++ frontend/src/components/UserMenu.vue | 39 ++++- frontend/src/components/menu.vue | 160 ++++++++++++++++-- frontend/src/i18n/locales/en-US.ts | 2 + frontend/src/i18n/locales/ko-KR.ts | 2 + frontend/src/i18n/locales/ru-RU.ts | 2 + frontend/src/i18n/locales/zh-CN.ts | 2 + frontend/src/stores/ui.ts | 18 +- frontend/src/views/agent/AgentList.vue | 2 - frontend/src/views/auth/Login.vue | 107 ++++++++++++ .../src/views/knowledge/KnowledgeBaseList.vue | 4 - 11 files changed, 320 insertions(+), 31 deletions(-) diff --git a/frontend/src/assets/theme/theme.css b/frontend/src/assets/theme/theme.css index d160474b..9cb90a56 100644 --- a/frontend/src/assets/theme/theme.css +++ b/frontend/src/assets/theme/theme.css @@ -115,4 +115,17 @@ } :root[theme-mode="dark"] .more-wrap:hover .more-icon { opacity: 0.9; +} + +/* 覆盖浏览器自动填充的背景色(Chrome 会强制加浅蓝/浅黄底色) */ +input:-webkit-autofill, +input:-webkit-autofill:hover, +input:-webkit-autofill:focus, +input:-webkit-autofill:active, +textarea:-webkit-autofill, +select:-webkit-autofill { + -webkit-box-shadow: 0 0 0 1000px var(--td-bg-color-container) inset !important; + -webkit-text-fill-color: var(--td-text-color-primary) !important; + caret-color: var(--td-text-color-primary) !important; + transition: background-color 5000s ease-in-out 0s; } \ No newline at end of file diff --git a/frontend/src/components/UserMenu.vue b/frontend/src/components/UserMenu.vue index 5819654e..f5a1d726 100644 --- a/frontend/src/components/UserMenu.vue +++ b/frontend/src/components/UserMenu.vue @@ -1,16 +1,18 @@