Змінено директорії

Додано скрипти CRON
Поліпшено механізм запису стендів та їх редагування
This commit is contained in:
2025-10-27 00:11:18 +02:00
parent 1d9f9a1468
commit 04f39da611
196 changed files with 4962 additions and 4065 deletions

View File

@@ -1,4 +1,4 @@
const STATIC_CACHE_NAME = 'v2.0.2';
const STATIC_CACHE_NAME = 'v2.0.13';
const FILES_TO_CACHE = [
'/',
@@ -48,6 +48,9 @@ const FILES_TO_CACHE = [
"/lib/pages/territory/editor/script.js",
"/lib/pages/territory/editor/style.css",
"/lib/pages/territory/editor/script.js",
"/lib/pages/territory/editor/style.css",
"/lib/pages/territory/card/script.js",
"/lib/pages/territory/card/style.css",
@@ -110,6 +113,9 @@ self.addEventListener("push", event => {
let data = {};
try { data = event.data.json(); } catch { data = { title: "Уведомлення", body: event.data?.text() }; }
console.log(data);
const title = data.title || "Уведомлення";
const options = {
body: data.body || "",
@@ -124,7 +130,7 @@ self.addEventListener("push", event => {
self.addEventListener("notificationclick", event => {
event.notification.close();
event.waitUntil(
clients.matchAll({ type: "window", includeUncontrolled: true }).then(clientList => {
clients.matchAll({ type: "window", includeUncontrolled: true }).then(clientList => {
for (const client of clientList) {
if (client.url === event.notification.data && "focus" in client) return client.focus();
}