fix(push): use SuperSam application icon in notifications

This commit is contained in:
root 2026-08-06 10:15:42 +00:00
parent 4768864c08
commit 9e4ce20c96
2 changed files with 6 additions and 6 deletions

View File

@ -1,8 +1,8 @@
const isLocalhost = self.location.hostname === "localhost" || self.location.hostname === "127.0.0.1"; const isLocalhost = self.location.hostname === "localhost" || self.location.hostname === "127.0.0.1";
if (!isLocalhost) { if (!isLocalhost) {
const STATIC_CACHE = "construction-delivery-static-v90"; const STATIC_CACHE = "construction-delivery-static-v91";
const RUNTIME_CACHE = "construction-delivery-runtime-v90"; const RUNTIME_CACHE = "construction-delivery-runtime-v91";
const APP_SHELL_URLS = ["/", "/index.html", "/manifest.webmanifest", "/icons/icon-192.png", "/icons/icon-512.png"]; const APP_SHELL_URLS = ["/", "/index.html", "/manifest.webmanifest", "/icons/icon-192.png", "/icons/icon-512.png"];
self.addEventListener("install", (event) => { self.addEventListener("install", (event) => {
@ -95,8 +95,8 @@ self.addEventListener("push", (event) => {
event.waitUntil( event.waitUntil(
self.registration.showNotification(title || "Уведомление", { self.registration.showNotification(title || "Уведомление", {
body: body || "", body: body || "",
icon: "/icons/manifest-192.png", icon: "/icons/icon-512.png",
badge: "/icons/manifest-192.png", badge: "/icons/icon-512.png",
data: { url: url || "/dashboard" }, data: { url: url || "/dashboard" },
}), }),
); );

View File

@ -111,8 +111,8 @@ def build_payload(title, body, url, order_group_id=None):
"body": body, "body": body,
"url": url, "url": url,
"order_group_id": order_group_id, "order_group_id": order_group_id,
"icon": "/icons/manifest-192.png", "icon": "/icons/icon-512.png",
"badge": "/icons/manifest-192.png", "badge": "/icons/icon-512.png",
"vibrate": [200, 100, 200], "vibrate": [200, 100, 200],
}) })