fix bottom links reactivity

This commit is contained in:
Michael Genson 2025-05-19 20:02:49 +00:00
commit d85428ddf8

View file

@ -16,7 +16,7 @@
absolute absolute
:top-link="topLinks" :top-link="topLinks"
:secondary-links="cookbookLinks || []" :secondary-links="cookbookLinks || []"
:bottom-links="isAdmin ? bottomLinks : []" :bottom-links="bottomLinks"
> >
<v-menu <v-menu
offset-y offset-y
@ -228,14 +228,18 @@ export default defineNuxtComponent({
}, },
]); ]);
const bottomLinks = computed<SideBarLink[]>(() => [ const bottomLinks = computed<SideBarLink[]>(() =>
{ isAdmin.value
icon: $globals.icons.cog, ? [
title: i18n.t("general.settings"), {
to: "/admin/site-settings", icon: $globals.icons.cog,
restricted: true, title: i18n.t("general.settings"),
}, to: "/admin/site-settings",
]); restricted: true,
},
]
: []
);
const topLinks = computed<SideBarLink[]>(() => [ const topLinks = computed<SideBarLink[]>(() => [
{ {
@ -307,7 +311,6 @@ export default defineNuxtComponent({
createLinks, createLinks,
bottomLinks, bottomLinks,
topLinks, topLinks,
isAdmin,
isOwnGroup, isOwnGroup,
languageDialog, languageDialog,
toggleDark, toggleDark,