Skip to content

Commit 8c2fadd

Browse files
committed
feat: user regisiter modal
1 parent e9d2145 commit 8c2fadd

1 file changed

Lines changed: 34 additions & 36 deletions

File tree

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,41 @@
11
<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">
44
<div class="rounded-full wb-icon w-8 shadow-xl">
55
<IconUser class="h-8 w-8" />
66
</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"
2011
>
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>
3819
</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>
4234
</template>
4335

4436
<script setup lang="ts">
4537
import { useAuthStore } from '@/store/auth'
46-
import { reactive } from 'vue'
38+
import { reactive, ref } from 'vue'
4739
import { useI18n } from 'vue-i18n'
4840
4941
const { t } = useI18n()
@@ -54,4 +46,10 @@
5446
email: '',
5547
password: ''
5648
})
49+
const open = ref(false)
50+
51+
const onLoad = () => {
52+
open.value = false
53+
// AUTH.user = payload
54+
}
5755
</script>

0 commit comments

Comments
 (0)