From 22812e06323c613d8ed0fe9e2ed8916fb6059b12 Mon Sep 17 00:00:00 2001 From: Bernd Storath <32197462+kaaax0815@users.noreply.github.com> Date: Wed, 2 Jul 2025 09:42:09 +0200 Subject: [PATCH] Fix: Admin menu text (#1999) make admin menu reactive --- src/app/pages/admin.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/pages/admin.vue b/src/app/pages/admin.vue index b75819d8..7420817d 100644 --- a/src/app/pages/admin.vue +++ b/src/app/pages/admin.vue @@ -44,18 +44,19 @@ const { t } = useI18n(); const route = useRoute(); -const menuItems = [ +const menuItems = computed(() => [ { id: 'general', name: t('pages.admin.general') }, { id: 'config', name: t('pages.admin.config') }, { id: 'interface', name: t('pages.admin.interface') }, { id: 'hooks', name: t('pages.admin.hooks') }, -]; +]); const defaultItem = { id: '', name: t('pages.admin.panel') }; const activeMenuItem = computed(() => { return ( - menuItems.find((item) => route.path === `/admin/${item.id}`) ?? defaultItem + menuItems.value.find((item) => route.path === `/admin/${item.id}`) ?? + defaultItem ); });