Виправлення помилок.
Додан новий метод авторізації в застосунок.
This commit is contained in:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user