forked from mohammad-ashrafi2020/codeyad-shop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.vue
63 lines (58 loc) · 1.37 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<template>
<div>
<NuxtLayout>
<NuxtLoadingIndicator color="#0d6efd" :height="5" />
<NuxtPage />
</NuxtLayout>
<Transition mode="out-in" name="page">
<div class="auth__loading" v-if="authStore.loading">
<div class="content">Loading...</div>
</div>
</Transition>
</div>
</template>
<script setup lang="ts">
import { useUtilStore } from './stores/utilStore';
import { useShopCartStore } from './stores/shopCartStore';
import { useAuthStore } from './stores/authStore';
const utilStore = useUtilStore();
const authStore = useAuthStore();
const shopCartStore = useShopCartStore();
shopCartStore.Init();
useAsyncData("categories", () => utilStore.setCategories());
useHead({
link: [
{ rel: "stylesheet", href: "/css/dependencies.css" },
{
rel: "stylesheet",
href: "https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css",
},
],
});
</script>
<style scoped>
.auth__loading {
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
background: rgba(0, 0, 0, 0.459);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.auth__loading .content {
width: 40%;
min-height: 100px;
background: white;
color: black;
display: flex;
align-items: center;
justify-content: center;
font-size: 15px;
border-radius: 12px;
text-align: center;
}
</style>