mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-21 20:11:48 +02:00
Make web push toggle global
This commit is contained in:
parent
a8db08c7d4
commit
46798ac322
10 changed files with 99 additions and 91 deletions
web/src/app
|
@ -114,6 +114,11 @@ class Notifier {
|
|||
return this.pushSupported() && this.contextSupported() && this.granted() && !this.iosSupportedButInstallRequired();
|
||||
}
|
||||
|
||||
async pushEnabled() {
|
||||
const enabled = await prefs.webPushEnabled();
|
||||
return this.pushPossible() && enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this is a HTTPS site, or served over localhost. Otherwise the Notification API
|
||||
* is not supported, see https://developer.mozilla.org/en-US/docs/Web/API/notification
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue