From e717c1d69fe10b632dfb96990ba074abcfefae18 Mon Sep 17 00:00:00 2001 From: tajniak81 <13187254+tajniak81@users.noreply.github.com> Date: Sat, 31 Oct 2026 12:22:11 +0100 Subject: [PATCH] Give the web app an AFFiNE-style shell - The main view is an inset panel beside the sidebar; views put their breadcrumbs and actions in its header via . - The sidebar resizes from its edge (220-480px, double-click resets) and folds away with a button or Ctrl+/; both are remembered per browser. - A workspace card at the top opens a menu to switch, configure or add a workspace, replacing the select. - Search sits beside a new-page button, followed by Home and Settings; space headings show open, trash and add-page actions on hover. - The footer has a theme button cycling system, light and dark. Co-Authored-By: Claude Opus 5.5 --- Packages/ui/src/icons.ts | 6 + Web-App/frontend/src/components/AppLayout.vue | 298 +++++++++++------- .../src/components/WorkspaceSwitcher.vue | 105 ++++++ .../frontend/src/composables/useSidebar.ts | 48 +++ Web-App/frontend/src/locales/en.json | 7 +- Web-App/frontend/src/locales/pl.json | 7 +- Web-App/frontend/src/views/HomeView.vue | 2 +- Web-App/frontend/src/views/page/PageView.vue | 52 +-- .../frontend/src/views/space/SpaceView.vue | 38 +-- .../frontend/src/views/space/TrashView.vue | 15 +- 10 files changed, 420 insertions(+), 158 deletions(-) create mode 100644 Web-App/frontend/src/components/WorkspaceSwitcher.vue create mode 100644 Web-App/frontend/src/composables/useSidebar.ts diff --git a/Packages/ui/src/icons.ts b/Packages/ui/src/icons.ts index a07b6aa..8e9bd14 100644 --- a/Packages/ui/src/icons.ts +++ b/Packages/ui/src/icons.ts @@ -32,6 +32,12 @@ export const iconPaths = { open: ["M8 16L16 8", "M9 8h7v7"], restore: ["M4.5 13a7.5 7.5 0 1 0 2.2-6.3", "M5 4v4h4"], "sign-out": ["M14 4h5v16h-5", "M10 8l-4 4 4 4", "M6 12h9"], + sidebar: ["M4 5h16v14H4z", "M9.5 5v14"], + home: ["M4 11l8-7 8 7", "M6 9.5V20h12V9.5", "M10 20v-5h4v5"], + sun: ["M12 8a4 4 0 1 0 0 8a4 4 0 1 0 0-8z", "M12 3v1.5", "M12 19.5V21", "M3 12h1.5", "M19.5 12H21", "M5.6 5.6l1.1 1.1", "M17.3 17.3l1.1 1.1", "M5.6 18.4l1.1-1.1", "M17.3 6.7l1.1-1.1"], + moon: ["M19.5 14.5A8 8 0 0 1 9.5 4.5a8 8 0 1 0 10 10z"], + monitor: ["M4 5h16v11H4z", "M9 20h6", "M12 16v4"], + selector: ["M8 9l4-4 4 4", "M8 15l4 4 4-4"], } as const; export type IconName = keyof typeof iconPaths; diff --git a/Web-App/frontend/src/components/AppLayout.vue b/Web-App/frontend/src/components/AppLayout.vue index bec7647..ee254b9 100644 --- a/Web-App/frontend/src/components/AppLayout.vue +++ b/Web-App/frontend/src/components/AppLayout.vue @@ -1,14 +1,19 @@