auth loader
This commit is contained in:
@@ -19,6 +19,7 @@ const signedIn = ref<boolean>(false)
|
||||
const closeAuthModal = async (close: () => Promise<boolean>) => {
|
||||
await close()
|
||||
signedIn.value = true
|
||||
redirectPending.value = false
|
||||
}
|
||||
watch(user, () => {
|
||||
if (!user.value) signedIn.value = false
|
||||
@@ -48,12 +49,12 @@ const redirectPending = ref<boolean>(isPendingRedirect())
|
||||
>
|
||||
<i class="fas fa-plus-circle text-[1.1rem]" />
|
||||
</button>
|
||||
<Modal v-if="!signedIn" v-model="redirectPending">
|
||||
<Modal v-if="!signedIn" :open="redirectPending">
|
||||
<template #activator="{ open }">
|
||||
<button class="btn-outline btn-sm btn py-1 text-white" @click="open">Sign in</button>
|
||||
</template>
|
||||
<template #default="{ close }">
|
||||
<Auth @signedIn="closeAuthModal(close)" />
|
||||
<Auth :authenticating="redirectPending" @signedIn="closeAuthModal(close)" />
|
||||
</template>
|
||||
<template #actions="{ close }">
|
||||
<button class="btn-sm btn" @click="close">Close</button>
|
||||
|
||||
Reference in New Issue
Block a user