-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.vue
153 lines (140 loc) · 4.27 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<template>
<VitePwaManifest />
<NuxtLoadingIndicator
color="linear-gradient(to right, #ffeae3 0%, #db1306 100%)"
/>
<v-app>
<NuxtLayout>
<v-app-bar :elevation="y === 0 || drawer ? 0 : 4">
<NuxtLink to="/">
<v-avatar class="ml-3">
<v-img src="/mga.png"></v-img>
</v-avatar>
</NuxtLink>
<NuxtLink to="/" class="text-decoration-none text-black ml-2">
<v-app-bar-title>마인즈</v-app-bar-title>
</NuxtLink>
<template v-slot:append>
<v-btn v-if="userInfo" to="/account" icon="mdi-account"></v-btn>
<v-btn v-else to="/login" icon="mdi-account"></v-btn>
<v-app-bar-nav-icon @click="drawer = !drawer"></v-app-bar-nav-icon>
</template>
</v-app-bar>
<v-navigation-drawer v-model="drawer" location="end" temporary>
<v-list-item to="/" title="홈" prepend-icon="mdi-home"></v-list-item>
<v-list-item
title="커뮤니티"
prepend-icon="mdi-account-group-outline"
append-icon="mdi-menu-down"
>
<v-menu activator="parent">
<v-list>
<v-list-item
to="/community/share-emotion"
title="감정 나누기"
prepend-icon="mdi-heart"
></v-list-item>
</v-list>
</v-menu>
</v-list-item>
<v-list-item
title="마음신호등"
prepend-icon="mdi-magnify"
append-icon="mdi-menu-down"
>
<v-menu activator="parent">
<v-list>
<v-list-item
to="/test/"
title="심리검사"
prepend-icon="mdi-head-cog"
></v-list-item>
<v-list-item
to="/test/easy"
title="EASY검사"
prepend-icon="mdi-chart-line"
></v-list-item>
</v-list>
</v-menu>
</v-list-item>
<v-list-item
title="마음처방약국"
prepend-icon="mdi-hospital"
append-icon="mdi-menu-down"
>
<v-menu activator="parent">
<v-list>
<v-list-item
to="/cafe/recommendation/user"
title="사용자 추천"
prepend-icon="mdi-account-group"
></v-list-item>
<v-list-item
to="/cafe/recommendation/admin"
title="전문가 추천"
prepend-icon="mdi-account-child-circle"
></v-list-item>
<v-list-item
to="/cafe/recommendation/ai"
title="AI 추천"
prepend-icon="mdi-robot"
></v-list-item>
<v-list-item
to="/cafe/stress-management"
title="스트레스 관리법"
prepend-icon="mdi-emoticon-happy"
></v-list-item>
</v-list>
</v-menu>
</v-list-item>
<v-list-item
to="/wee"
title="Wee 클래스"
prepend-icon="mdi-hospital-building"
></v-list-item>
</v-navigation-drawer>
<v-main>
<div
:class="`${
route.path !== '/test/easy/admin' ?? 'd-flex justify-center'
}`"
>
<NuxtPage />
</div>
<br /><br /><br />
<br /><br /><br />
</v-main>
<v-footer
style="
position: absolute;
bottom: 0;
width: 100%;
background-color: #ffeae4;
"
>
<NuxtLink to="/thanks" style="color: black; text-decoration: none">
<div>
{{ new Date().getFullYear() }} —
<strong>심장박동 & 코딩인싸이트</strong>
</div>
</NuxtLink>
</v-footer>
</NuxtLayout>
</v-app>
</template>
<script setup>
import { useWindowScroll } from "@vueuse/core";
import { useTitle } from "@vueuse/core";
import { onAuthStateChanged } from "firebase/auth";
const route = useRoute();
const drawer = ref(false);
const userInfo = ref({});
const { $auth } = useNuxtApp();
const { x, y } = useWindowScroll();
onMounted(() => {
onAuthStateChanged($auth, (user) => {
userInfo.value = user;
});
});
useTitle("마인즈");
</script>