fix: disable enabling notifications if user needs to re-login

zio/stable
Daniel Roe 2022-12-17 23:55:00 +00:00
parent 80ad2ab607
commit d7236910a5
No known key found for this signature in database
GPG Key ID: 22D5008E4F5D9B55
1 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@ defineProps<{
}>()
defineEmits(['hide', 'subscribe'])
const isLegacyAccount = computed(() => !currentUser.value?.vapidKey)
</script>
<template>
@ -32,7 +33,7 @@ defineEmits(['hide', 'subscribe'])
btn-outline rounded-full font-bold py4 flex="~ gap2 center" m5
type="button"
:class="busy ? 'border-transparent' : null"
:disabled="busy"
:disabled="busy || isLegacyAccount"
@click="$emit('subscribe')"
>
<span aria-hidden="true" :class="busy && animate ? 'i-ri:loader-2-fill animate-spin' : 'i-ri:check-line'" />