2024-07-02 15:07:22 +00:00
|
|
|
<template>
|
|
|
|
<v-app>
|
2024-08-13 08:00:58 +00:00
|
|
|
<nuxt-loading-indicator color="white" />
|
2024-07-02 15:07:22 +00:00
|
|
|
<nuxt-layout>
|
|
|
|
<nuxt-page />
|
|
|
|
</nuxt-layout>
|
|
|
|
</v-app>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2024-08-10 13:16:36 +00:00
|
|
|
import { useTheme } from "vuetify"
|
2024-07-02 15:07:22 +00:00
|
|
|
import "@unocss/reset/tailwind.css"
|
2024-08-10 13:16:36 +00:00
|
|
|
|
|
|
|
const theme = useTheme()
|
2024-08-12 08:41:21 +00:00
|
|
|
const auth = useUserinfo()
|
2024-08-10 13:16:36 +00:00
|
|
|
|
2024-08-16 12:07:20 +00:00
|
|
|
const { locale } = useI18n()
|
|
|
|
|
|
|
|
watch(locale, (value) => {
|
|
|
|
useHead({
|
|
|
|
htmlAttrs: {
|
|
|
|
lang: value,
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}, { deep: true, immediate: true })
|
|
|
|
|
2024-08-10 13:16:36 +00:00
|
|
|
onMounted(() => {
|
|
|
|
theme.global.name.value = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"
|
|
|
|
|
|
|
|
window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", event => {
|
|
|
|
theme.global.name.value = event.matches ? "dark" : "light"
|
|
|
|
})
|
2024-08-12 07:55:15 +00:00
|
|
|
|
2024-08-12 15:51:42 +00:00
|
|
|
auth.readProfiles()
|
2024-08-10 13:16:36 +00:00
|
|
|
})
|
2024-07-02 15:07:22 +00:00
|
|
|
</script>
|
2024-10-03 18:35:02 +00:00
|
|
|
|
|
|
|
<style>
|
|
|
|
.page-enter-active,
|
|
|
|
.page-leave-active {
|
|
|
|
transition: all 0.25s ease-in-out;
|
|
|
|
}
|
|
|
|
.page-enter-from,
|
|
|
|
.page-leave-to {
|
|
|
|
opacity: 0;
|
|
|
|
filter: blur(1rem);
|
|
|
|
}
|
|
|
|
</style>
|