Capital/app.vue

49 lines
940 B
Vue
Raw Normal View History

2024-07-02 15:07:22 +00:00
<template>
<v-app>
<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">
import { useTheme } from "vuetify"
2024-07-02 15:07:22 +00:00
import "@unocss/reset/tailwind.css"
const theme = useTheme()
2024-08-12 08:41:21 +00:00
const auth = useUserinfo()
2024-08-16 12:07:20 +00:00
const { locale } = useI18n()
watch(locale, (value) => {
useHead({
htmlAttrs: {
lang: value,
},
})
}, { deep: true, immediate: true })
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 15:51:42 +00:00
auth.readProfiles()
})
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>