feat: migrar backend unificado a Go 1.27 + SPA Vite embebido

This commit is contained in:
urieljareth
2026-11-28 09:20:55 -06:00
parent 4f64487b88
commit b5ebcd0b86
332 changed files with 29135 additions and 37275 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

+37
View File
@@ -0,0 +1,37 @@
// Service worker del panel de cliente: solo notificaciones push.
// Sin estrategias de cache — el panel siempre va a red.
self.addEventListener("push", (event) => {
let data = {};
try {
data = event.data ? event.data.json() : {};
} catch {
data = {};
}
const titulo = (data && data.titulo) || "Cotizador — Uriel Jareth Consulting";
const cuerpo = (data && data.cuerpo) || "";
const url = (data && data.url) || "/cliente/pagos";
event.waitUntil(
self.registration.showNotification(titulo, {
body: cuerpo,
icon: "/favicon.ico",
data: { url },
})
);
});
self.addEventListener("notificationclick", (event) => {
const data = event.notification.data || {};
const url = data.url || "/cliente/pagos";
event.notification.close();
event.waitUntil(
self.clients
.matchAll({ type: "window", includeUncontrolled: true })
.then((cs) => {
const existing = cs.find((c) => "focus" in c);
return existing
? existing.navigate(url).then(() => existing.focus())
: self.clients.openWindow(url);
})
);
});