-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.vue
45 lines (41 loc) · 825 Bytes
/
app.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
<template>
<NuxtLoadingIndicator />
<NuxtLayout>
<NuxtPage />
<DynamicDialog />
</NuxtLayout>
<Toast />
<ConfirmPopup />
</template>
<script setup lang="ts">
const toast = useToast()
const { appTheme } = useAppTheme()
useHead({
htmlAttrs: {
class: [appTheme],
},
title: 'DistApp',
})
globalThis.$fetch = globalThis.$fetch.create({
onResponseError(response) {
if (!response.response.ok) {
toast.add({
severity: 'error',
summary: 'Error',
detail: normalizeError(response),
life: 3000,
})
}
}
})
</script>
<style lang="scss">
html,
body,
#__nuxt {
margin: 0px;
height: 100%;
width: 100%;
background: var(--p-content-background);
}
</style>