refactor: modify top-level app.vue
it no longer has the nuxt welcome screen, and additionally uses my default layout with an antd config
This commit is contained in:
parent
6409f4d646
commit
4dc6b9c396
27
app.vue
27
app.vue
@ -1,5 +1,26 @@
|
|||||||
|
<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>
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<a-config-provider :theme="{
|
||||||
<NuxtWelcome />
|
token: {
|
||||||
</div>
|
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>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user