capacitor firebase auth
This commit is contained in:
@@ -21,12 +21,12 @@ const emit = defineEmits<{
|
||||
|
||||
const searchActive = ref<boolean>(false)
|
||||
|
||||
const authUI: any = inject('firebaseAuthUI')
|
||||
const authPending = ref<boolean>(authUI.isPendingRedirect())
|
||||
// const authUI: any = inject('firebaseAuthUI')
|
||||
// const authPending = ref<boolean>(authUI.isPendingRedirect())
|
||||
|
||||
const handleSignIn = async (close: () => Promise<boolean>) => {
|
||||
await close()
|
||||
authPending.value = false
|
||||
// authPending.value = false
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
@@ -50,7 +50,7 @@ const handleSignIn = async (close: () => Promise<boolean>) => {
|
||||
/>
|
||||
</div>
|
||||
<div class="flex h-full flex-grow flex-row items-center gap-2 pl-5 pr-3">
|
||||
<template v-if="!loading || authPending">
|
||||
<template v-if="!loading">
|
||||
<SearchBar @active="(active) => (searchActive = active)" />
|
||||
<UIButton
|
||||
size="sm"
|
||||
@@ -60,7 +60,7 @@ const handleSignIn = async (close: () => Promise<boolean>) => {
|
||||
>
|
||||
<i class="fa-fw fa-solid fa-plus-circle scale-[115%]" />
|
||||
</UIButton>
|
||||
<UIModal v-if="(initialized && !user) || authPending" :open="authPending">
|
||||
<UIModal v-if="(initialized && !user)">
|
||||
<template #activator="{ open }">
|
||||
<UIButton
|
||||
size="sm"
|
||||
@@ -71,9 +71,9 @@ const handleSignIn = async (close: () => Promise<boolean>) => {
|
||||
Sign in
|
||||
</UIButton>
|
||||
</template>
|
||||
<template #title>{{ authPending ? 'Signing in...' : 'Sign in' }}</template>
|
||||
<template #title>Sign in</template>
|
||||
<template #default="{ close }">
|
||||
<Auth @signedIn="handleSignIn(close)" :authenticating="authPending" />
|
||||
<Auth @signedIn="handleSignIn(close)" />
|
||||
</template>
|
||||
<template #actions="{ close }">
|
||||
<UIButton size="sm" @click="close">Close</UIButton>
|
||||
|
||||
Reference in New Issue
Block a user