1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 16:27:38 +02:00

[ticket/17344] Show an alert when webpush subscribing is denied

PHPBB-17344
This commit is contained in:
Matt Friedman
2024-06-16 08:49:36 -07:00
parent 5992eff175
commit 0fc1a8c1f8
4 changed files with 4 additions and 2 deletions

View File

@@ -150,6 +150,7 @@ function PhpbbWebpush() {
// Prevent the user from clicking the subscribe button multiple times.
const result = await Notification.requestPermission();
if (result === 'denied') {
phpbb.alert(subscribeButton.getAttribute('data-l-err'), subscribeButton.getAttribute('data-l-msg'));
return;
}