From 117c6b9948b011a06979f18cc896a398862c6c2b Mon Sep 17 00:00:00 2001 From: sophiafema Date: Sat, 16 Aug 2025 15:32:09 +0000 Subject: [PATCH] fix(ui): adjust menu item order in drawer --- frontend/components/Layout/DefaultLayout.vue | 53 +++++++++++--------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/frontend/components/Layout/DefaultLayout.vue b/frontend/components/Layout/DefaultLayout.vue index 9f353680d..9bd41cb38 100644 --- a/frontend/components/Layout/DefaultLayout.vue +++ b/frontend/components/Layout/DefaultLayout.vue @@ -286,24 +286,39 @@ export default defineNuxtComponent({ }, ]); - const bottomLinks = computed(() => - isAdmin.value - ? [ - { - icon: $globals.icons.cog, - title: i18n.t("general.settings"), - to: "/admin/site-settings", - restricted: true, - }, - ] - : [], - ); + const bottomLinks = computed(() => { + const links: SideBarLink[] = []; + links.push( + { + icon: $globals.icons.book, + to: `/g/${groupSlug.value}/cookbooks`, + title: i18n.t("sidebar.cookbooks"), + restricted: true, + }, + { + icon: $globals.icons.timelineText, + title: i18n.t("recipe.timeline"), + to: `/g/${groupSlug.value}/recipes/timeline`, + restricted: true, + }, + ); + if (isAdmin.value) { + links.push({ + icon: $globals.icons.cog, + title: i18n.t("sidebar.site-settings"), + to: "/admin/site-settings", + restricted: true, + }); + } + + return links; + }); const topLinks = computed(() => [ { icon: $globals.icons.silverwareForkKnife, to: `/g/${groupSlug.value}`, - title: i18n.t("general.recipes"), + title: i18n.t("sidebar.all-recipes"), restricted: false, }, { @@ -324,18 +339,6 @@ export default defineNuxtComponent({ to: "/shopping-lists", restricted: true, }, - { - icon: $globals.icons.timelineText, - title: i18n.t("recipe.timeline"), - to: `/g/${groupSlug.value}/recipes/timeline`, - restricted: true, - }, - { - icon: $globals.icons.book, - to: `/g/${groupSlug.value}/cookbooks`, - title: i18n.t("cookbook.cookbooks"), - restricted: true, - }, { icon: $globals.icons.organizers, title: i18n.t("general.organizers"),