add tab favorites
This commit is contained in:
parent
e67084c118
commit
eaa31c4bea
|
|
@ -2,6 +2,7 @@
|
|||
import { computed } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import type { NavigationMenuItem } from '@nuxt/ui'
|
||||
import { useFavoritesStore } from '~/stores/favorites'
|
||||
|
||||
const { locale, locales, setLocale } = useI18n()
|
||||
|
||||
|
|
@ -10,6 +11,9 @@ const t = $i18n.t;
|
|||
|
||||
const open = ref(false)
|
||||
|
||||
const favorites = useFavoritesStore()
|
||||
const { total: favTotal } = storeToRefs(favorites)
|
||||
|
||||
const links = [[{
|
||||
label: t('nav.bible_studies'),
|
||||
icon: 'ph:books',
|
||||
|
|
@ -41,6 +45,12 @@ const links = [[{
|
|||
icon: 'ph:chalkboard-teacher',
|
||||
to: '/ebn',
|
||||
onSelect: () => { open.value = false }
|
||||
}, {
|
||||
label: 'Mi lista',
|
||||
icon: 'i-lucide-bookmark',
|
||||
to: '/favoritos',
|
||||
badge: favTotal.value > 0 ? String(favTotal.value) : undefined,
|
||||
onSelect: () => { open.value = false }
|
||||
}]] satisfies NavigationMenuItem[][]
|
||||
</script>
|
||||
|
||||
|
|
@ -56,8 +66,8 @@ const links = [[{
|
|||
class="bg-elevated/25 bg-gradient-to-tr from-blue-100 to-white"
|
||||
:ui="{ footer: 'lg:border-t lg:border-default' }"
|
||||
>
|
||||
<template #header>
|
||||
<div class="mt-2 flex justify-center">
|
||||
<template #header="{ collapsed }">
|
||||
<div v-if="!collapsed" class="mt-2 flex justify-center">
|
||||
<img src="/logo.svg" class="w-full" alt="Buscador - La Gran Carpa Catedral" />
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Reference in New Issue