|
1 | 1 | <template> |
2 | | - <Menu as="div" class="relative"> |
3 | | - <MenuButton class="flex justify-center items-center rounded-full w-8"> |
| 2 | + <div> |
| 3 | + <Button @click="open = !open" class="flex justify-center items-center rounded-full w-8"> |
4 | 4 | <div class="rounded-full wb-icon w-8 shadow-xl"> |
5 | 5 | <IconUser class="h-8 w-8" /> |
6 | 6 | </div> |
7 | | - </MenuButton> |
8 | | - <MenuItems |
9 | | - v-motion |
10 | | - :initial="{ opacity: 0, y: -10 }" |
11 | | - :enter="{ |
12 | | - opacity: 1, |
13 | | - y: 0, |
14 | | - transition: { |
15 | | - delay: 0, |
16 | | - duration: 300, |
17 | | - }, |
18 | | - }" |
19 | | - class="absolute rounded font-raleway p-4 flex flex-col gap-5 right-0 w-64 bg-theme-background-3" |
| 7 | + </Button> |
| 8 | + <div |
| 9 | + v-if="open && !AUTH.user" |
| 10 | + class="wb-text bg-theme-background-2 p-5 w-full mt-5 gap-5 text-xs flex flex-col text-center items-center justify-center" |
20 | 11 | > |
21 | | - <MenuItem> |
22 | | - <div |
23 | | - class="wb-text w-full mt-5 gap-5 text-xs flex flex-col text-center items-center justify-center" |
24 | | - > |
25 | | - <div v-if="!AUTH.user" class="flex flex-col gap-5 w-full"> |
26 | | - <h4 class="font-poppins">{{ t('backend.title') }}</h4> |
27 | | - <InputText :placeholder="t('backend.email')" class="bg-theme-background-2 hover:bg-theme-background-1 px-3 py-1 rounded-full" v-model="setter.email" /> |
28 | | - <InputText :placeholder="t('backend.password')" class="bg-theme-background-2 hover:bg-theme-background-1 px-3 py-1 rounded-full" v-model="setter.password" /> |
29 | | - <Button class="bg-theme-background-2 text-md hover:bg-theme-background-1">{{ t('backend.start') }}</Button> |
30 | | - </div> |
31 | | - <router-link to="/terms-of-use" class="font-bold pt-10 cursor-pointer">{{ |
32 | | - t('editor.bar.help.terms') |
33 | | - }}</router-link> |
34 | | - <p>&</p> |
35 | | - <router-link to="/privacy" class="font-bold cursor-pointer">{{ |
36 | | - t('editor.bar.help.privacy') |
37 | | - }}</router-link> |
| 12 | + <div class="flex mt-100 p-5 flex-col gap-5 w-full"> |
| 13 | + <div class="flex w-full justify-end"> |
| 14 | + <Button @click="open = !open" class="flex justify-center items-center rounded-full w-8"> |
| 15 | + <div class="rounded-full wb-icon w-8 shadow-xl"> |
| 16 | + <IconClose class="h-8 w-8" /> |
| 17 | + </div> |
| 18 | + </Button> |
38 | 19 | </div> |
39 | | - </MenuItem> |
40 | | - </MenuItems> |
41 | | - </Menu> |
| 20 | + <h4 class="font-poppins">{{ t('backend.title') }}</h4> |
| 21 | + <InputText :placeholder="t('backend.email')" class="bg-theme-background-3 hover:bg-theme-background-1 px-3 py-1 rounded-full" v-model="setter.email" /> |
| 22 | + <InputText :placeholder="t('backend.password')" class="bg-theme-background-3 hover:bg-theme-background-1 px-3 py-1 rounded-full" v-model="setter.password" /> |
| 23 | + <Button @click="onLoad" class="bg-theme-background-3 text-md hover:bg-theme-background-4">{{ t('backend.start') }}</Button> |
| 24 | + </div> |
| 25 | + <router-link to="/terms-of-use" class="font-bold pt-10 cursor-pointer">{{ |
| 26 | + t('editor.bar.help.terms') |
| 27 | + }}</router-link> |
| 28 | + <p>&</p> |
| 29 | + <router-link to="/privacy" class="font-bold cursor-pointer">{{ |
| 30 | + t('editor.bar.help.privacy') |
| 31 | + }}</router-link> |
| 32 | + </div> |
| 33 | + </div> |
42 | 34 | </template> |
43 | 35 |
|
44 | 36 | <script setup lang="ts"> |
45 | 37 | import { useAuthStore } from '@/store/auth' |
46 | | - import { reactive } from 'vue' |
| 38 | + import { reactive, ref } from 'vue' |
47 | 39 | import { useI18n } from 'vue-i18n' |
48 | 40 |
|
49 | 41 | const { t } = useI18n() |
|
54 | 46 | email: '', |
55 | 47 | password: '' |
56 | 48 | }) |
| 49 | + const open = ref(false) |
| 50 | +
|
| 51 | + const onLoad = () => { |
| 52 | + open.value = false |
| 53 | + // AUTH.user = payload |
| 54 | + } |
57 | 55 | </script> |
0 commit comments