Add notifications-permissions-error to translations

This commit is contained in:
schlagmichdoch 2023-10-11 23:48:25 +02:00
parent ca8a5de47e
commit 4e00e5b358
4 changed files with 6 additions and 16 deletions

View file

@ -2073,11 +2073,11 @@ class Notifications {
_requestPermission() {
Notification.requestPermission(permission => {
if (permission !== 'granted') {
Events.fire('notify-user', Notifications.PERMISSION_ERROR || 'Error');
Events.fire('notify-user', Localization.getTranslation("notifications.notifications-permissions-error"));
return;
}
Events.fire('notify-user', Localization.getTranslation("notifications.notifications-enabled"));
this.$button.setAttribute('hidden', 1);
this.$button.setAttribute('hidden', "");
});
}
@ -2784,9 +2784,3 @@ window.addEventListener("keydown", (e) => {
window.location.hash = '#';
}
});
Notifications.PERMISSION_ERROR = `
Notifications permission has been blocked
as the user has dismissed the permission prompt several times.
This can be reset in Page Info
which can be accessed by clicking the lock icon next to the URL.`;