From 0d4baf785128941e000eb3eed1b4f223260be835 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Wed, 11 Jun 2025 16:55:25 +0200 Subject: [PATCH] docs(app): improve header dropdown items --- docs/app/components/Header.vue | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/app/components/Header.vue b/docs/app/components/Header.vue index eea89734..1d0977b2 100644 --- a/docs/app/components/Header.vue +++ b/docs/app/components/Header.vue @@ -22,9 +22,7 @@ onMounted(() => { const navigation = inject>('navigation') -const githubLink = computed(() => { - return `https://github.com/nuxt/${value.value}` -}) +const githubLink = computed(() => `https://github.com/nuxt/${value.value}`) const desktopLinks = computed(() => props.links.map(({ icon, ...link }) => link)) const mobileLinks = computed(() => [ @@ -36,6 +34,16 @@ const mobileLinks = computed(() => [ target: '_blank' } ]) + +const items = computed(() => { + const ui2 = { label: 'v2.22.0', to: 'https://ui2.nuxt.com' } + const uiPro1 = { label: 'v1.8.0', to: 'https://ui2.nuxt.com/pro' } + + return [ + { label: `v${config.version}`, active: true, color: 'primary' as const, checked: true, type: 'checkbox' as const }, + route.path === '/' ? ui2 : route.path.startsWith('/pro') ? uiPro1 : module.value === 'ui-pro' ? uiPro1 : ui2 + ] +})