2023-09-25 19:37:33 -04:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import { theme } from 'ant-design-vue';
|
|
|
|
import { IUser } from './models/user';
|
|
|
|
|
|
|
|
const {data: user}: any = await useApiFetch("/auth/session")
|
|
|
|
provide("dark", user?.profile?.nightMode || false)
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
2023-09-23 15:58:51 -04:00
|
|
|
<template>
|
2023-09-25 19:37:33 -04:00
|
|
|
<a-config-provider :theme="{
|
|
|
|
token: {
|
|
|
|
colorPrimary: '#ff3c8e',
|
|
|
|
colorSuccess: '#2be396',
|
|
|
|
colorWarning: '#face14',
|
|
|
|
colorInfo: '#17e3ff'
|
|
|
|
},
|
|
|
|
algorithm: ((user as IUser)?.profile?.nightMode || false) ? theme.darkAlgorithm : theme.defaultAlgorithm
|
|
|
|
}">
|
|
|
|
|
|
|
|
<NuxtLayout>
|
|
|
|
<NuxtPage/>
|
|
|
|
<!-- <NuxtWelcome /> -->
|
|
|
|
</NuxtLayout>
|
|
|
|
</a-config-provider>
|
2023-09-23 15:58:51 -04:00
|
|
|
</template>
|