add auth modal

This commit is contained in:
2023-05-20 04:05:36 +02:00
parent 2990e5ec89
commit 684a1d76bf
10 changed files with 303 additions and 144 deletions

View File

@@ -6,14 +6,10 @@ const modalBox = ref(null)
const show = ref(false)
const open = () => (show.value = true)
const close = async () => {
const close = () => {
return new Promise((resolve) => {
modal.value?.addEventListener('transitionend', () => resolve(true))
show.value = false
// nextTick(() => {
// console.log('done!')
// resolve(true)
// })
})
}
@@ -45,7 +41,7 @@ const onLeave = (el: Element, done: () => void): void => {
</p>
<div class="modal-action">
<slot name="actions" v-bind="slotProps">
<button class="btn-sm btn" @click="close">Close</button>
<button class="btn-sm btn" @click="close()">Close</button>
</slot>
</div>
</div>