forked from kingwrcy/moments
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.vue
51 lines (43 loc) · 1.17 KB
/
default.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<template>
<div class="wrapper w-full h-full bg-[#f1f5f9] dark:bg-slate-800 rounded-md dark:text-[#C0BEBF]">
<ScrollArea class="h-full" type="hover">
<div class="main lg:w-[567px] mx-auto shadow-2xl bg-white dark:bg-[#181818]">
<HeaderImg />
<slot />
<Footer />
</div>
<ScrollBar orientation="vertical" />
</ScrollArea>
</div>
<Toaster position="top-center" rich-colors />
</template>
<script setup lang="ts">
import { Toaster } from '@/components/ui/sonner';
import type { User } from '~/lib/types';
import { ScrollArea, ScrollBar } from '@/components/ui/scroll-area'
const userinfo = useState<User>('userinfo')
await callOnce(async () => {
const { data: res } = await useAsyncData('userinfo', async () => await $fetch('/api/user/settings/get'))
userinfo.value = res.value?.data as any as User
})
useHead({
link: [
{
rel: 'shortcut icon',
type: 'image/png',
href: userinfo.value?.favicon || '/favicon.png',
},
],
style: [
{
textContent: userinfo.value?.css || '',
}
],
script: [
{
type: 'text/javascript',
textContent: userinfo.value?.js || '',
}
]
})
</script>