next/app.vue
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 40524941c6
fix(nuxt): update app.vue
add `.value` to the end of computed value accesses
2023-12-28 19:59:00 -05:00

74 lines
1.5 KiB
Vue

<script lang="ts" setup>
import { theme } from "ant-design-vue";
const { getSession, signIn } = useAuth();
await getSession({ force: true });
const { data } = await useAuth();
const dop = data?.value as any;
let darkBool = ref(dop?.user?.profile?.nightMode || false);
// provide("user", ref(dop?.user || null));
provide("dark", darkBool);
useHead({
bodyAttrs: {
"data-theme": computed(() => {
return darkBool.value ? "dark" : undefined;
}).value,
},
titleTemplate: (title) =>
title ? `Rockfic | ${title}` : "Rockfic | Band fiction that rocks",
});
// provide("loaded", useNuxtApp().$loaded);
// let loaded = ref<boolean[]>([]);
// provide("loaded", {
// loaded,
// pushState() {
// loaded.value.push(false)
// },
// flipLast() {
// loaded.value[ loaded.value.length ] = true
// }
// });
</script>
<template>
<NuxtLayout>
<NuxtPage />
<!-- <NuxtWelcome /> -->
</NuxtLayout>
<nuxt-error-boundary>
<template #error="{ error, clearError }">
<error-bound :error="error" />
</template>
</nuxt-error-boundary>
</template>
<style>
body[data-theme="dark"],
body[data-theme="dark"] .alayhead {
background-color: #141414;
color: #fff;
}
html {
background: #f5f5f5;
}
html,
body {
height: 100%;
}
html:has(body[data-theme="dark"]) {
background-color: #141414 !important;
}
body {
margin: 0px !important;
}
body:not([data-theme="dark"]) .alayhead {
background-color: #f5f5f5 !important;
}
</style>