Updated sidebar to be global
This commit is contained in:
@@ -1,21 +1,28 @@
|
||||
<script lang="ts" setup>
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useCalendar } from '@/stores/CalendarStore'
|
||||
import type { MenuItem } from '~/components/global/SidebarProps';
|
||||
import { PhMagnifyingGlass } from '@phosphor-icons/vue'
|
||||
|
||||
import Calendar from '@/components/calendar/Calendar.vue'
|
||||
import Sidebar from '@/components/calendar/Sidebar.vue'
|
||||
import CalendarSearch from '@/components/calendar/search/CalendarSearch.vue'
|
||||
|
||||
const { revealAdvancedSearch } = useCalendar()
|
||||
const { isAdvancedSearchOpen } = storeToRefs(useCalendar())
|
||||
|
||||
useHead({
|
||||
title: 'Calendar'
|
||||
})
|
||||
|
||||
const sidebarMenu: MenuItem[] = [
|
||||
{
|
||||
phIcon: PhMagnifyingGlass,
|
||||
tooltip: 'Recherche avancée',
|
||||
clickHandler: revealAdvancedSearch
|
||||
}
|
||||
]
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="h-full grid grid-cols-[auto_1fr]">
|
||||
<Sidebar />
|
||||
<Sidebar :menu-items="sidebarMenu" />
|
||||
<Calendar />
|
||||
|
||||
<CalendarSearch v-model:model-value="isAdvancedSearchOpen" />
|
||||
|
||||
Reference in New Issue
Block a user