forked from Mirrors/elk
feat: show re-auth message when missing vapid_key
(#542)
This commit is contained in:
parent
c8de9c45fa
commit
03d3775011
4 changed files with 10 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
defineProps<{
|
defineProps<{
|
||||||
|
showReAuthMessage: boolean
|
||||||
withHeader?: boolean
|
withHeader?: boolean
|
||||||
busy?: boolean
|
busy?: boolean
|
||||||
animate?: boolean
|
animate?: boolean
|
||||||
|
@ -29,6 +30,9 @@ const isLegacyAccount = computed(() => !currentUser.value?.vapidKey)
|
||||||
<p>
|
<p>
|
||||||
{{ $t(withHeader ? 'notification.settings.warning.enable_description' : 'notification.settings.warning.enable_description_short') }}
|
{{ $t(withHeader ? 'notification.settings.warning.enable_description' : 'notification.settings.warning.enable_description_short') }}
|
||||||
</p>
|
</p>
|
||||||
|
<p v-if="isLegacyAccount && showReAuthMessage">
|
||||||
|
{{ $t('notification.settings.warning.re_auth') }}
|
||||||
|
</p>
|
||||||
<button
|
<button
|
||||||
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"
|
||||||
|
|
|
@ -161,6 +161,7 @@ onActivated(() => (busy = false))
|
||||||
v-else
|
v-else
|
||||||
:animate="animateSubscription"
|
:animate="animateSubscription"
|
||||||
:busy="busy"
|
:busy="busy"
|
||||||
|
:show-re-auth-message="!showWarning"
|
||||||
@hide="hideNotification"
|
@hide="hideNotification"
|
||||||
@subscribe="doSubscribe"
|
@subscribe="doSubscribe"
|
||||||
/>
|
/>
|
||||||
|
@ -173,6 +174,7 @@ onActivated(() => (busy = false))
|
||||||
</Transition>
|
</Transition>
|
||||||
<NotificationEnablePushNotification
|
<NotificationEnablePushNotification
|
||||||
v-if="showWarning"
|
v-if="showWarning"
|
||||||
|
:show-re-auth-message="true"
|
||||||
with-header
|
with-header
|
||||||
px5
|
px5
|
||||||
py4
|
py4
|
||||||
|
|
|
@ -193,7 +193,8 @@
|
||||||
"enable_description": "To receive notifications when Elk is not open, enable push notifications. You can control precisely what types of interactions generate push notifications via the \"@:notification.settings.show_btn{'\"'} button above once enabled.",
|
"enable_description": "To receive notifications when Elk is not open, enable push notifications. You can control precisely what types of interactions generate push notifications via the \"@:notification.settings.show_btn{'\"'} button above once enabled.",
|
||||||
"enable_description_short": "To change push notifications settings when Elk is not open, you must first enable push notifications.",
|
"enable_description_short": "To change push notifications settings when Elk is not open, you must first enable push notifications.",
|
||||||
"enable_desktop": "Enable push notifications",
|
"enable_desktop": "Enable push notifications",
|
||||||
"enable_title": "Never miss anything"
|
"enable_title": "Never miss anything",
|
||||||
|
"re_auth": "It seems that your server does not support push notifications. Try sign out and sign in again, if this message still appears contact your server administrator."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"signed_up": "signed up",
|
"signed_up": "signed up",
|
||||||
|
|
|
@ -193,7 +193,8 @@
|
||||||
"enable_description": "Para recibir notificaciones cuando Elk no esté abierto, habilite las notificaciones push. Puedes controlar con precisión qué tipos de interacciones generan notificaciones push a través del botón \"@:notification.settings.show_btn{'\"'} de arriba una vez que estén habilitadas.",
|
"enable_description": "Para recibir notificaciones cuando Elk no esté abierto, habilite las notificaciones push. Puedes controlar con precisión qué tipos de interacciones generan notificaciones push a través del botón \"@:notification.settings.show_btn{'\"'} de arriba una vez que estén habilitadas.",
|
||||||
"enable_description_short": "Para cambiar los ajustes de las notificaciones push cuando Elk no esté abierto, debe habilitar antes las notificaciones push.",
|
"enable_description_short": "Para cambiar los ajustes de las notificaciones push cuando Elk no esté abierto, debe habilitar antes las notificaciones push.",
|
||||||
"enable_desktop": "Habilitar notificaciones push",
|
"enable_desktop": "Habilitar notificaciones push",
|
||||||
"enable_title": "Nunca te pierdas nada"
|
"enable_title": "Nunca te pierdas nada",
|
||||||
|
"re_auth": "Parace que su servidor no soporta notificaciones push. Pruebe a cerrar la sesión y volver a iniciarla, si este mensaje sigue apareciendo contacte con el administrador de su servidor."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"update_status": "ha actualizado su estado"
|
"update_status": "ha actualizado su estado"
|
||||||
|
|
Loading…
Reference in a new issue