diff options
author | Grigorii K. Shartsev <me@shgk.me> | 2023-10-18 11:40:41 +0200 |
---|---|---|
committer | Grigorii K. Shartsev <me@shgk.me> | 2023-10-19 18:47:02 +0200 |
commit | 776f5da83112e1847f97cacb45822f4096f877ca (patch) | |
tree | cda3a6592adc34143e68a3f2878bba6bdcc44c37 /core/src/views/UserMenu.vue | |
parent | f4e3f0965426e251affbbf9398d8b4165ba84074 (diff) | |
download | nextcloud-server-776f5da83112e1847f97cacb45822f4096f877ca.tar.gz nextcloud-server-776f5da83112e1847f97cacb45822f4096f877ca.zip |
fix(core): do not assign all navigation entry properties as html attributes
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Diffstat (limited to 'core/src/views/UserMenu.vue')
-rw-r--r-- | core/src/views/UserMenu.vue | 22 |
1 files changed, 20 insertions, 2 deletions
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 @@ </template> <ul> <UserMenuEntry v-for="entry in settingsNavEntries" - v-bind="entry" - :key="entry.id" /> + :id="entry.id" + :key="entry.id" + :name="entry.name" + :href="entry.href" + :active="entry.active" + :icon="entry.icon" /> </ul> </NcHeaderMenu> </template> @@ -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) => { |