From 07d42668c3aba1d7cef439bf9ec25f9773c6fb7e Mon Sep 17 00:00:00 2001 From: Vordgi Date: Sun, 13 Sep 2026 14:01:18 +0100 Subject: [PATCH] feat: draft menu redesign --- app/components/AppHeader.vue | 170 ++++++---- app/components/Header/AccountMenu.client.vue | 331 ++++++------------- app/components/Header/SearchBox.vue | 2 +- app/components/MenuDropdown.vue | 162 +++++++++ app/types/index.ts | 1 + app/types/menu-dropdown.ts | 23 ++ i18n/locales/en.json | 5 +- 7 files changed, 397 insertions(+), 297 deletions(-) create mode 100644 app/components/MenuDropdown.vue create mode 100644 app/types/menu-dropdown.ts diff --git a/app/components/AppHeader.vue b/app/components/AppHeader.vue index 223a2be7ef..934cac0f13 100644 --- a/app/components/AppHeader.vue +++ b/app/components/AppHeader.vue @@ -1,6 +1,5 @@ diff --git a/app/components/Header/SearchBox.vue b/app/components/Header/SearchBox.vue index e416735a58..1f304ee79a 100644 --- a/app/components/Header/SearchBox.vue +++ b/app/components/Header/SearchBox.vue @@ -70,7 +70,7 @@ defineExpose({ focus, blur }) name="q" :placeholder="$t('search.placeholder')" no-correct - class="w-full min-w-25 ps-7 pe-8" + class="w-full min-w-25 ps-7 pe-8 py-2.5!" @focus="handleFocus" @blur="handleBlur" size="sm" diff --git a/app/components/MenuDropdown.vue b/app/components/MenuDropdown.vue new file mode 100644 index 0000000000..3ecf6e3f0f --- /dev/null +++ b/app/components/MenuDropdown.vue @@ -0,0 +1,162 @@ + + + diff --git a/app/types/index.ts b/app/types/index.ts index f736f8b329..f8b1b2d96a 100644 --- a/app/types/index.ts +++ b/app/types/index.ts @@ -2,6 +2,7 @@ import '#app' import '#vue-router' export * from './icon' export * from './navigation' +export * from './menu-dropdown' declare module '#app' { interface PageMeta { diff --git a/app/types/menu-dropdown.ts b/app/types/menu-dropdown.ts new file mode 100644 index 0000000000..bcbf36186f --- /dev/null +++ b/app/types/menu-dropdown.ts @@ -0,0 +1,23 @@ +import type { NuxtLinkProps } from '#app' +import type { IconClass } from './icon' + +type MenuDropdownItemBase = { + title: string + description?: string + icon?: IconClass + /** Keyboard shortcut hint, e.g. "c" or "⌘K" */ + shortcut?: string +} + +export type MenuDropdownLinkItem = MenuDropdownItemBase & { + type: 'link' + href: NuxtLinkProps['to'] + external?: boolean +} + +export type MenuDropdownActionItem = MenuDropdownItemBase & { + type: 'action' + handler: () => void +} + +export type MenuDropdownItem = MenuDropdownLinkItem | MenuDropdownActionItem diff --git a/i18n/locales/en.json b/i18n/locales/en.json index 1e164af70a..594ccb65ec 100644 --- a/i18n/locales/en.json +++ b/i18n/locales/en.json @@ -206,13 +206,16 @@ "main_navigation": "Main", "popular_packages": "Popular packages", "settings": "settings", + "settings_desc": "Manage your preferences", "compare": "compare", + "compare_desc": "Compare packages side by side", "back": "back", "menu": "Menu", "mobile_menu": "Navigation menu", "open_menu": "Open menu", "links": "Links", - "tap_to_search": "Tap to search" + "tap_to_search": "Tap to search", + "features": "features" }, "blog": { "title": "Blog",