Rebuild General Layout to Nuxt UI PRO Dashboard

This commit is contained in:
2024-02-22 22:23:15 +01:00
parent c6e0854544
commit 96d4ee7356
14 changed files with 897 additions and 259 deletions

View File

@@ -0,0 +1,29 @@
import { createSharedComposable } from '@vueuse/core'
const _useDashboard = () => {
const route = useRoute()
const router = useRouter()
const isHelpSlideoverOpen = ref(false)
const isNotificationsSlideoverOpen = ref(false)
defineShortcuts({
'g-h': () => router.push('/'),
'g-i': () => router.push('/inbox'),
'g-u': () => router.push('/users'),
'g-s': () => router.push('/settings'),
'?': () => isHelpSlideoverOpen.value = true,
n: () => isNotificationsSlideoverOpen.value = true
})
watch(() => route.fullPath, () => {
isHelpSlideoverOpen.value = false
isNotificationsSlideoverOpen.value = false
})
return {
isHelpSlideoverOpen,
isNotificationsSlideoverOpen
}
}
export const useDashboard = createSharedComposable(_useDashboard)