mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-25 17:26:18 -04:00
Add notifications-permissions-error to translations
This commit is contained in:
parent
ca8a5de47e
commit
4e00e5b358
4 changed files with 6 additions and 16 deletions
|
@ -119,6 +119,7 @@
|
|||
"file-content-incorrect": "File content is incorrect.",
|
||||
"clipboard-content-incorrect": "Clipboard content is incorrect.",
|
||||
"notifications-enabled": "Notifications enabled.",
|
||||
"notifications-permissions-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.",
|
||||
"link-received": "Link received by {{name}} - Click to open",
|
||||
"message-received": "Message received by {{name}} - Click to copy",
|
||||
"click-to-download": "Click to download",
|
||||
|
|
|
@ -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.`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue