Виправлення помилок.

Додан новий метод авторізації в застосунок.
This commit is contained in:
2026-06-16 16:50:01 +03:00
parent 0b38f137bf
commit 9797ff6137
28 changed files with 2756 additions and 493 deletions
+13 -2
View File
@@ -1,4 +1,4 @@
const STATIC_CACHE_NAME = 'v2.2.9';
const STATIC_CACHE_NAME = 'v2.2.32';
const FILES_TO_CACHE = [
'/',
@@ -24,6 +24,8 @@ const FILES_TO_CACHE = [
"/lib/components/cloud.js",
"/lib/components/qr-code-styling.js",
"/lib/components/jsQR.min.js",
"/lib/components/clipboard.js",
"/lib/components/colorGroup.js",
"/lib/components/makeid.js",
@@ -153,7 +155,16 @@ self.addEventListener("push", event => {
data: data.url || "/"
};
event.waitUntil(self.registration.showNotification(title, options));
const notificationPromise = self.registration.showNotification(title, options);
let badgePromise = Promise.resolve();
if ('setAppBadge' in navigator) {
const count = data.badgeCount || 1;
badgePromise = navigator.setAppBadge(count);
}
event.waitUntil(Promise.all([notificationPromise, badgePromise]));
});
self.addEventListener("notificationclick", event => {