ffplayout/layouts/default.vue

31 lines
733 B
Vue
Raw Normal View History

2020-01-29 17:40:15 +01:00
<template>
2024-04-04 23:28:25 +02:00
<div class="min-h-screen bg-base-200">
2024-04-11 21:45:35 +02:00
<div v-if="authStore.isLogin && !String(route.name).includes('index')" class="sticky top-0 z-10">
2024-04-16 18:13:28 +02:00
<HeaderMenu />
2023-01-11 10:54:25 +01:00
</div>
2024-04-04 23:28:25 +02:00
2024-04-11 21:45:35 +02:00
<main :class="authStore.isLogin && !String(route.name).includes('index') ? 'h-[calc(100%-52px)]' : 'h-full'">
2024-04-04 23:28:25 +02:00
<slot />
</main>
2024-04-16 18:13:28 +02:00
<AlertMsg />
2024-04-04 23:28:25 +02:00
</div>
2020-01-29 17:40:15 +01:00
</template>
2023-01-11 10:54:25 +01:00
<script setup lang="ts">
2024-04-09 21:08:25 +02:00
const colorMode = useColorMode()
2023-01-11 10:54:25 +01:00
const configStore = useConfig()
2024-04-04 23:28:25 +02:00
const authStore = useAuth()
2024-04-09 21:08:25 +02:00
const indexStore = useIndex()
2020-05-28 10:15:07 +02:00
2024-04-04 23:28:25 +02:00
const route = useRoute()
2023-01-11 10:54:25 +01:00
await configStore.nuxtClientInit()
2024-04-09 21:08:25 +02:00
if (colorMode.value === 'dark') {
indexStore.darkMode = true
} else {
indexStore.darkMode = false
}
2023-01-11 10:54:25 +01:00
</script>