From b508de843fc8c9add284264759dee18c525b4f69 Mon Sep 17 00:00:00 2001 From: "Albert.Zhou" <279841786@qq.com> Date: Fri, 1 May 2026 16:05:16 +0800 Subject: [PATCH] feat: add sidebar collapse toggle for compact icon-rail mode (#335) Add a collapse button at the top of the left sidebar that toggles between full-width (240px with icons + labels) and compact icon-only mode (64px). The collapse state is persisted to localStorage and survives page refreshes. Changes: - Add collapse toggle button with chevron icon in sidebar - Add CSS rules for .sidebar.collapsed: narrow width, centered icons, hidden labels/group-headers/footer-text - Leverage existing store state (sidebarCollapsed, toggleSidebarCollapsed) and SCSS variable ($sidebar-collapsed-width) that were already defined but never wired up in the template This significantly improves browsing experience on tablets and handheld devices by freeing up horizontal space when the full sidebar is not needed. --- .../src/components/layout/AppSidebar.vue | 116 +++++++++++++++++- 1 file changed, 115 insertions(+), 1 deletion(-) diff --git a/packages/client/src/components/layout/AppSidebar.vue b/packages/client/src/components/layout/AppSidebar.vue index 022dc1c..cff419a 100644 --- a/packages/client/src/components/layout/AppSidebar.vue +++ b/packages/client/src/components/layout/AppSidebar.vue @@ -57,13 +57,20 @@ function openChangelog() {