ffplayout/layouts/default.vue

31 lines
724 B
Vue
Raw Normal View History

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