fix: disable enabling notifications if user needs to re-login
parent
80ad2ab607
commit
d7236910a5
|
@ -6,6 +6,7 @@ defineProps<{
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
defineEmits(['hide', 'subscribe'])
|
defineEmits(['hide', 'subscribe'])
|
||||||
|
const isLegacyAccount = computed(() => !currentUser.value?.vapidKey)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -32,7 +33,7 @@ defineEmits(['hide', 'subscribe'])
|
||||||
btn-outline rounded-full font-bold py4 flex="~ gap2 center" m5
|
btn-outline rounded-full font-bold py4 flex="~ gap2 center" m5
|
||||||
type="button"
|
type="button"
|
||||||
:class="busy ? 'border-transparent' : null"
|
:class="busy ? 'border-transparent' : null"
|
||||||
:disabled="busy"
|
:disabled="busy || isLegacyAccount"
|
||||||
@click="$emit('subscribe')"
|
@click="$emit('subscribe')"
|
||||||
>
|
>
|
||||||
<span aria-hidden="true" :class="busy && animate ? 'i-ri:loader-2-fill animate-spin' : 'i-ri:check-line'" />
|
<span aria-hidden="true" :class="busy && animate ? 'i-ri:loader-2-fill animate-spin' : 'i-ri:check-line'" />
|
||||||
|
|
Loading…
Reference in New Issue