2023-09-25 19:37:33 -04:00
|
|
|
<script lang="ts" setup>
|
2023-10-05 20:02:43 -04:00
|
|
|
import { theme } from "ant-design-vue";
|
|
|
|
import { IUser } from "./models/user";
|
2023-09-25 19:37:33 -04:00
|
|
|
|
2023-10-05 20:02:43 -04:00
|
|
|
const dop = useAuth().data?.value as any;
|
|
|
|
let darkBool = dop?.user?.profile?.nightMode || false;
|
|
|
|
provide("user", ref(dop?.user || null));
|
|
|
|
provide("dark", darkBool);
|
|
|
|
useHead({
|
|
|
|
bodyAttrs: {
|
|
|
|
"data-theme": computed(() => {
|
|
|
|
return darkBool ? "dark" : undefined;
|
|
|
|
}).value,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
let loaded = ref<boolean>(false);
|
|
|
|
provide("loaded", loaded);
|
|
|
|
// let loaded = ref<boolean[]>([]);
|
|
|
|
// provide("loaded", {
|
|
|
|
// loaded,
|
|
|
|
// pushState() {
|
|
|
|
// loaded.value.push(false)
|
|
|
|
// },
|
|
|
|
// flipLast() {
|
|
|
|
// loaded.value[ loaded.value.length ] = true
|
|
|
|
// }
|
|
|
|
// });
|
2023-09-25 19:37:33 -04:00
|
|
|
</script>
|
2023-09-23 15:58:51 -04:00
|
|
|
<template>
|
2023-10-05 20:02:43 -04:00
|
|
|
<a-config-provider
|
|
|
|
:theme="{
|
|
|
|
token: {
|
|
|
|
colorPrimary: '#ff2883',
|
|
|
|
colorSuccess: '#2be396',
|
|
|
|
colorWarning: '#face14',
|
|
|
|
colorInfo: '#15c6e3',
|
|
|
|
colorTextBase: darkBool ? '#fff' : '#101010',
|
|
|
|
},
|
|
|
|
algorithm: darkBool ? theme.darkAlgorithm : theme.defaultAlgorithm,
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
<NuxtLayout>
|
|
|
|
<NuxtPage />
|
|
|
|
<!-- <NuxtWelcome /> -->
|
|
|
|
</NuxtLayout>
|
|
|
|
</a-config-provider>
|
2023-09-23 15:58:51 -04:00
|
|
|
</template>
|
2023-10-05 20:02:43 -04:00
|
|
|
<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>
|