-
Notifications
You must be signed in to change notification settings - Fork 5
/
app.vue
63 lines (54 loc) · 1.34 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>
<NuxtLayout>
<NuxtLoadingIndicator />
<NuxtPage />
<Modal v-if="dialog && dialog.show" @backdrop="handleDialogOnBackdrop()">
<Dialog :dialog="dialog" />
</Modal>
<Snackbar />
<Loading />
</NuxtLayout>
</template>
<script>
export default {
setup() {
const dialog = useDialog();
function handleDialogOnBackdrop() {
return dialog.value?.triggerPrimaryActionOnBackdropClick;
}
const user = useUser();
const cookie_user = useCookie('user');
user.value = cookie_user.value ?? null;
const session = useSession();
const cookie_session = useCookie('session');
session.value = cookie_session.value ?? null;
const accessToken = useAccessToken();
const cookie_accessToken = useCookie('accessToken');
accessToken.value = cookie_accessToken.value ?? '';
const refreshToken = useRefreshToken();
const cookie_refreshToken = useCookie('refreshToken');
refreshToken.value = cookie_refreshToken.value ?? '';
return { dialog, handleDialogOnBackdrop };
},
};
</script>
<style>
.page-enter-active,
.page-leave-active {
transition: all 0.4s;
}
.page-enter-from,
.page-leave-to {
opacity: 0;
transform: translateY(-25px);
}
.layout-enter-active,
.layout-leave-active {
transition: all 0.4s;
}
.layout-enter-from,
.layout-leave-to {
opacity: 0;
filter: blur(1rem);
}
</style>