From 776f5da83112e1847f97cacb45822f4096f877ca Mon Sep 17 00:00:00 2001 From: "Grigorii K. Shartsev" Date: Wed, 18 Oct 2023 11:40:41 +0200 Subject: [PATCH] fix(core): do not assign all navigation entry properties as html attributes Signed-off-by: Grigorii K. Shartsev --- .../src/components/UserMenu/UserMenuEntry.vue | 4 ++-- core/src/views/UserMenu.vue | 22 +++++++++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/core/src/components/UserMenu/UserMenuEntry.vue b/core/src/components/UserMenu/UserMenuEntry.vue index 43f65fa9fdb..8f09137256c 100644 --- a/core/src/components/UserMenu/UserMenuEntry.vue +++ b/core/src/components/UserMenu/UserMenuEntry.vue @@ -30,11 +30,11 @@ - + {{ name }} diff --git a/core/src/views/UserMenu.vue b/core/src/views/UserMenu.vue index 464dfc4b399..8940e31c3c2 100644 --- a/core/src/views/UserMenu.vue +++ b/core/src/views/UserMenu.vue @@ -36,8 +36,12 @@
    + :id="entry.id" + :key="entry.id" + :name="entry.name" + :href="entry.href" + :active="entry.active" + :icon="entry.icon" />
@@ -58,6 +62,20 @@ import UserMenuEntry from '../components/UserMenu/UserMenuEntry.vue' import logger from '../logger.js' +/** + * @typedef SettingNavEntry + * @property {string} id - id of the entry, used as HTML ID, for example, "settings" + * @property {string} name - Label of the entry, for example, "Personal Settings" + * @property {string} icon - Icon of the entry, for example, "/apps/settings/img/personal.svg" + * @property {'settings'|'link'|'guest'} type - Type of the entry + * @property {string} href - Link of the entry, for example, "/settings/user" + * @property {boolean} active - Whether the entry is active + * @property {number} order - Order of the entry + * @property {number} unread - Number of unread pf this items + * @property {string} classes - Classes for custom styling + */ + +/** @type {SettingNavEntry[]} */ const settingsNavEntries = loadState('core', 'settingsNavEntries', []) const translateStatus = (status) => { -- 2.39.5