Fix of the Notifications Funktions and the notifications system in generell in regarts to the Vapid key handeling

This commit is contained in:
2026-07-28 23:46:15 +02:00
parent b037434e89
commit 3571bb6f6d
4 changed files with 11 additions and 10 deletions
+3 -3
View File
@@ -324,7 +324,7 @@ const pushNotificationManager = new PushNotificationManager();
/**
* Show notification subscription UI (typically in settings)
*/
function showPushNotificationSettings() {
function showPushNotificationSettings(vapidPublicKey) {
const container = document.getElementById('push-notification-settings');
if (!container) return;
@@ -350,9 +350,9 @@ function showPushNotificationSettings() {
container.innerHTML = html;
// Set up button handler
// Set up button handler and pass the VAPID public key to init()
const toggleBtn = document.getElementById('toggle-push-btn');
pushNotificationManager.init().then(() => {
pushNotificationManager.init(vapidPublicKey).then(() => {
updatePushStatus();
});