From 6251499940c9c8e4631da9fadaccacde8f5f9306 Mon Sep 17 00:00:00 2001 From: Alexis Date: Fri, 15 Aug 2025 15:37:35 +0200 Subject: [PATCH] Added sheet for sidebar mobile --- app/components/global/sidebar/Footer.vue | 18 +++ app/components/global/sidebar/Menu.vue | 50 +++++++ app/components/global/sidebar/Sidebar.vue | 136 +++--------------- .../sidebar/{SidebarToggle.vue => Toggle.vue} | 3 +- app/components/global/user/CTA.vue | 83 +++++------ app/components/ui/avatar/index.ts | 6 +- app/components/ui/sheet/Sheet.vue | 18 +++ app/components/ui/sheet/SheetClose.vue | 15 ++ app/components/ui/sheet/SheetContent.vue | 53 +++++++ app/components/ui/sheet/SheetDescription.vue | 21 +++ app/components/ui/sheet/SheetFooter.vue | 16 +++ app/components/ui/sheet/SheetHeader.vue | 33 +++++ app/components/ui/sheet/SheetOverlay.vue | 21 +++ app/components/ui/sheet/SheetTitle.vue | 21 +++ app/components/ui/sheet/SheetTrigger.vue | 15 ++ app/components/ui/sheet/index.ts | 8 ++ app/layouts/default.vue | 10 -- app/lib/utils.ts | 3 +- app/pages/my.vue | 3 + components.json | 19 +-- i18n/i18n.config.ts | 6 +- package.json | 2 + pnpm-lock.yaml | 59 ++++++++ 23 files changed, 424 insertions(+), 195 deletions(-) create mode 100644 app/components/global/sidebar/Footer.vue create mode 100644 app/components/global/sidebar/Menu.vue rename app/components/global/sidebar/{SidebarToggle.vue => Toggle.vue} (65%) create mode 100644 app/components/ui/sheet/Sheet.vue create mode 100644 app/components/ui/sheet/SheetClose.vue create mode 100644 app/components/ui/sheet/SheetContent.vue create mode 100644 app/components/ui/sheet/SheetDescription.vue create mode 100644 app/components/ui/sheet/SheetFooter.vue create mode 100644 app/components/ui/sheet/SheetHeader.vue create mode 100644 app/components/ui/sheet/SheetOverlay.vue create mode 100644 app/components/ui/sheet/SheetTitle.vue create mode 100644 app/components/ui/sheet/SheetTrigger.vue create mode 100644 app/components/ui/sheet/index.ts create mode 100644 app/pages/my.vue diff --git a/app/components/global/sidebar/Footer.vue b/app/components/global/sidebar/Footer.vue new file mode 100644 index 0000000..79ab1e4 --- /dev/null +++ b/app/components/global/sidebar/Footer.vue @@ -0,0 +1,18 @@ + + + + diff --git a/app/components/global/sidebar/Menu.vue b/app/components/global/sidebar/Menu.vue new file mode 100644 index 0000000..655ca13 --- /dev/null +++ b/app/components/global/sidebar/Menu.vue @@ -0,0 +1,50 @@ + + + + + diff --git a/app/components/global/sidebar/Sidebar.vue b/app/components/global/sidebar/Sidebar.vue index b3281c9..f5286ed 100644 --- a/app/components/global/sidebar/Sidebar.vue +++ b/app/components/global/sidebar/Sidebar.vue @@ -1,136 +1,32 @@ diff --git a/app/components/global/sidebar/SidebarToggle.vue b/app/components/global/sidebar/Toggle.vue similarity index 65% rename from app/components/global/sidebar/SidebarToggle.vue rename to app/components/global/sidebar/Toggle.vue index 4f03b42..c5973ae 100644 --- a/app/components/global/sidebar/SidebarToggle.vue +++ b/app/components/global/sidebar/Toggle.vue @@ -8,8 +8,9 @@ const { toggleSidebar } = useUiStore() - + diff --git a/app/components/global/user/CTA.vue b/app/components/global/user/CTA.vue index 0dc94ef..88aeee9 100644 --- a/app/components/global/user/CTA.vue +++ b/app/components/global/user/CTA.vue @@ -44,46 +44,43 @@ async function handleLogout() { console.log(error.message) } } - -type AvailableRoutes = "/my" | "/my/settings" | "/about" - -function pushRoute(to: AvailableRoutes) { - router.push({ path: to }) - - closeMenu() -}