Wachato CRM: versión marca blanca configurable por entorno
CRM de WhatsApp, Instagram, Messenger y TikTok de Wachato, basado en Vocero CRM (MIT), listo para desplegar un negocio por instancia: - Marca blanca: nombre, color, moneda y giro del negocio desde el .env (BRAND_NAME, BRAND_ACCENT, BRAND_CURRENCY, BUSINESS_DESCRIPTION); se aplican una vez y luego manda Ajustes → Marca. - Superadmin sembrado al arrancar (SUPERADMIN_*), idempotente. - Servicios y precios, campos personalizados, exportación a Excel/PDF, respaldos, agenda, atribución de anuncios y transcripción de notas de voz. - Diseño con contraste AAA, tema claro y oscuro. - Despliegue: docker compose (Caddy opcional), plantillas para paneles con reverse proxy (deploy/aapanel), imagen publicada en GHCR por la CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
6edc6020d5
1316 files changed
+308543
No files matched your search
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="440" height="440" viewBox="0 0 440 440"><!-- Vocero: el fondo del chat. Dibujos propios en línea; el tono lo pone la opacidad. --><defs><g id="burbuja"><path d="M10 8H30A4 4 0 0 1 34 12V24A4 4 0 0 1 30 28H18L11 34V28H10A4 4 0 0 1 6 24V12A4 4 0 0 1 10 8Z"/><circle cx="14" cy="18" r="1"/><circle cx="20" cy="18" r="1"/><circle cx="26" cy="18" r="1"/></g><g id="corazon"><path d="M20 33C8 25 5 18 8 13C11 8 17 9 20 14C23 9 29 8 32 13C35 18 32 25 20 33Z"/></g><g id="estrella"><path d="M20 7L23.2 15.6L32.4 16L25.2 21.7L27.6 30.5L20 25.5L12.4 30.5L14.8 21.7L7.6 16L16.8 15.6Z"/></g><g id="avion"><path d="M6 19L34 8L26 32L19 23Z"/><path d="M34 8L19 23V31L23 27"/></g><g id="carita"><circle cx="20" cy="20" r="13"/><circle cx="15.5" cy="17" r=".8"/><circle cx="24.5" cy="17" r=".8"/><path d="M14 23Q20 29 26 23"/></g><g id="calendario"><rect x="7" y="10" width="26" height="23" rx="3"/><path d="M7 16H33M13 6V12M27 6V12M12 21H15M18.5 21H21.5M25 21H28M12 27H15M18.5 27H21.5"/></g><g id="reloj"><circle cx="20" cy="20" r="13"/><path d="M20 12V20L25 24"/></g><g id="telefono"><path d="M12 7C10 7 8 9 8 11C8 22 18 32 29 32C31 32 33 30 33 28V25L27 22L24 25C20 23 17 20 15 16L18 13L15 7Z"/></g><g id="cafe"><path d="M9 15H27V25A7 7 0 0 1 20 32H16A7 7 0 0 1 9 25Z"/><path d="M27 18H30A3.5 3.5 0 0 1 30 25H27"/><path d="M14 11C13 9 15 8 14 5M20 11C19 9 21 8 20 5"/></g><g id="nota"><path d="M15 29V10L30 7V26"/><circle cx="12" cy="29" r="3.2"/><circle cx="27" cy="26" r="3.2"/></g><g id="cactus"><path d="M17 34V10A3 3 0 0 1 23 10V34"/><path d="M17 22H13A3 3 0 0 1 10 19V15"/><path d="M23 19H27A3 3 0 0 0 30 16V13"/><path d="M11 34H29"/></g><g id="sol"><circle cx="20" cy="20" r="6"/><path d="M20 7V10M20 30V33M7 20H10M30 20H33M10.8 10.8L12.9 12.9M27.1 27.1L29.2 29.2M10.8 29.2L12.9 27.1M27.1 12.9L29.2 10.8"/></g><g id="nube"><path d="M12 29H29A6 6 0 0 0 29 17A8 8 0 0 0 14 15A7 7 0 0 0 12 29Z"/></g><g id="hoja"><path d="M8 32C8 16 18 8 33 7C32 22 24 32 8 32Z"/><path d="M8 32L22 18"/></g><g id="regalo"><rect x="8" y="17" width="24" height="16" rx="2"/><rect x="6" y="11" width="28" height="6" rx="1.5"/><path d="M20 11V33"/><path d="M20 11C16 4 10 8 14 11M20 11C24 4 30 8 26 11"/></g><g id="camara"><rect x="6" y="12" width="28" height="19" rx="3"/><circle cx="20" cy="21.5" r="5.5"/><path d="M14 12L16 8H24L26 12"/><circle cx="29" cy="16" r=".8"/></g><g id="sobre"><rect x="6" y="10" width="28" height="20" rx="2.5"/><path d="M7 11L20 21L33 11"/></g><g id="pin"><path d="M20 34C20 34 9 23 9 15A11 11 0 0 1 31 15C31 23 20 34 20 34Z"/><circle cx="20" cy="15" r="4"/></g><g id="foco"><path d="M15 26C15 22 11 20 11 15A9 9 0 0 1 29 15C29 20 25 22 25 26Z"/><path d="M16 30H24M17 33.5H23"/></g><g id="cohete"><path d="M20 5C27 10 28 19 25 27H15C12 19 13 10 20 5Z"/><circle cx="20" cy="15" r="3"/><path d="M15 21L10 27H15M25 21L30 27H25M18 30L20 35L22 30"/></g><g id="destello"><path d="M20 6C21 15 25 19 34 20C25 21 21 25 20 34C19 25 15 21 6 20C15 19 19 15 20 6Z"/></g><g id="palomitas"><path d="M4 21L10.5 27.5L22 13M14 25L16.5 27.5L28 13"/></g><g id="megafono"><path d="M8 16H13L28 9V31L13 24H8Z"/><path d="M13 24L15 31H19L17 25"/><path d="M32 15C34 17 34 23 32 25"/></g><g id="microfono"><rect x="15" y="6" width="10" height="17" rx="5"/><path d="M10 19A10 10 0 0 0 30 19"/><path d="M20 29V34M15 34H25"/></g><g id="etiqueta"><path d="M7 21L19 9H31V21L19 33Z"/><circle cx="26" cy="14" r="2.2"/></g><g id="carrito"><path d="M5 9H10L14 26H30L33 14H12"/><circle cx="16" cy="31" r="2"/><circle cx="28" cy="31" r="2"/></g><g id="luna"><path d="M24 6A14 14 0 1 0 34 25A11 11 0 0 1 24 6Z"/></g><g id="chile"><path d="M10 12C14 12 15 16 18 20C21 25 27 30 33 31C26 34 16 32 11 24C8 19 8 14 10 12Z"/><path d="M10 12C9 9 10 7 13 6"/></g><g id="bolsa"><path d="M9 14H31L29 34H11Z"/><path d="M15 18V12A5 5 0 0 1 25 12V18"/></g><g id="grafica"><path d="M8 33H33M12 33V24M19 33V18M26 33V21"/><path d="M10 15L17 9L22 12L31 5M26 5H31V10"/></g><g id="gato"><path d="M9 33V16L12 7L17 13H23L28 7L31 16V33Z"/><circle cx="16" cy="21" r=".9"/><circle cx="24" cy="21" r=".9"/><path d="M18.5 25L20 26.5L21.5 25M6 24H12M6 28H12M28 24H34M28 28H34"/></g><g id="planta"><path d="M12 24H28L26 34H14Z"/><path d="M20 24V14"/><path d="M20 18C15 18 13 14 13 10C18 10 20 13 20 18Z"/><path d="M20 15C25 15 27 11 27 7C22 7 20 10 20 15Z"/></g><g id="globo"><path d="M20 26C13 26 10 20 10 15A10 10 0 0 1 30 15C30 20 27 26 20 26Z"/><path d="M18 26L20 29L22 26"/><path d="M20 29C18 32 22 33 20 36"/></g><g id="dona"><circle cx="20" cy="20" r="13"/><circle cx="20" cy="20" r="4.5"/><path d="M12 14L13.5 15M27 13L25.5 14.5M13 26L14.5 25M26 27L27 25.5M20 9.5V11"/></g><g id="candado"><rect x="9" y="18" width="22" height="16" rx="3"/><path d="M14 18V13A6 6 0 0 1 26 13V18"/><path d="M20 24V28"/></g><g id="rayo"><path d="M22 5L10 22H19L17 35L30 17H21Z"/></g><g id="carnero"><path d="M15 16C15 14 17 13 20 13C23 13 25 14 25 16L24 27C23.5 30 22 32 20 32C18 32 16.5 30 16 27Z"/><path d="M15.5 15C11 10 4 13 5 Line truncated
|
||||
|
After Width: | Height: | Size: 22 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="440" height="440" viewBox="0 0 440 440"><!-- Vocero: el fondo del chat. Dibujos propios en línea; el tono lo pone la opacidad. --><defs><g id="burbuja"><path d="M10 8H30A4 4 0 0 1 34 12V24A4 4 0 0 1 30 28H18L11 34V28H10A4 4 0 0 1 6 24V12A4 4 0 0 1 10 8Z"/><circle cx="14" cy="18" r="1"/><circle cx="20" cy="18" r="1"/><circle cx="26" cy="18" r="1"/></g><g id="corazon"><path d="M20 33C8 25 5 18 8 13C11 8 17 9 20 14C23 9 29 8 32 13C35 18 32 25 20 33Z"/></g><g id="estrella"><path d="M20 7L23.2 15.6L32.4 16L25.2 21.7L27.6 30.5L20 25.5L12.4 30.5L14.8 21.7L7.6 16L16.8 15.6Z"/></g><g id="avion"><path d="M6 19L34 8L26 32L19 23Z"/><path d="M34 8L19 23V31L23 27"/></g><g id="carita"><circle cx="20" cy="20" r="13"/><circle cx="15.5" cy="17" r=".8"/><circle cx="24.5" cy="17" r=".8"/><path d="M14 23Q20 29 26 23"/></g><g id="calendario"><rect x="7" y="10" width="26" height="23" rx="3"/><path d="M7 16H33M13 6V12M27 6V12M12 21H15M18.5 21H21.5M25 21H28M12 27H15M18.5 27H21.5"/></g><g id="reloj"><circle cx="20" cy="20" r="13"/><path d="M20 12V20L25 24"/></g><g id="telefono"><path d="M12 7C10 7 8 9 8 11C8 22 18 32 29 32C31 32 33 30 33 28V25L27 22L24 25C20 23 17 20 15 16L18 13L15 7Z"/></g><g id="cafe"><path d="M9 15H27V25A7 7 0 0 1 20 32H16A7 7 0 0 1 9 25Z"/><path d="M27 18H30A3.5 3.5 0 0 1 30 25H27"/><path d="M14 11C13 9 15 8 14 5M20 11C19 9 21 8 20 5"/></g><g id="nota"><path d="M15 29V10L30 7V26"/><circle cx="12" cy="29" r="3.2"/><circle cx="27" cy="26" r="3.2"/></g><g id="cactus"><path d="M17 34V10A3 3 0 0 1 23 10V34"/><path d="M17 22H13A3 3 0 0 1 10 19V15"/><path d="M23 19H27A3 3 0 0 0 30 16V13"/><path d="M11 34H29"/></g><g id="sol"><circle cx="20" cy="20" r="6"/><path d="M20 7V10M20 30V33M7 20H10M30 20H33M10.8 10.8L12.9 12.9M27.1 27.1L29.2 29.2M10.8 29.2L12.9 27.1M27.1 12.9L29.2 10.8"/></g><g id="nube"><path d="M12 29H29A6 6 0 0 0 29 17A8 8 0 0 0 14 15A7 7 0 0 0 12 29Z"/></g><g id="hoja"><path d="M8 32C8 16 18 8 33 7C32 22 24 32 8 32Z"/><path d="M8 32L22 18"/></g><g id="regalo"><rect x="8" y="17" width="24" height="16" rx="2"/><rect x="6" y="11" width="28" height="6" rx="1.5"/><path d="M20 11V33"/><path d="M20 11C16 4 10 8 14 11M20 11C24 4 30 8 26 11"/></g><g id="camara"><rect x="6" y="12" width="28" height="19" rx="3"/><circle cx="20" cy="21.5" r="5.5"/><path d="M14 12L16 8H24L26 12"/><circle cx="29" cy="16" r=".8"/></g><g id="sobre"><rect x="6" y="10" width="28" height="20" rx="2.5"/><path d="M7 11L20 21L33 11"/></g><g id="pin"><path d="M20 34C20 34 9 23 9 15A11 11 0 0 1 31 15C31 23 20 34 20 34Z"/><circle cx="20" cy="15" r="4"/></g><g id="foco"><path d="M15 26C15 22 11 20 11 15A9 9 0 0 1 29 15C29 20 25 22 25 26Z"/><path d="M16 30H24M17 33.5H23"/></g><g id="cohete"><path d="M20 5C27 10 28 19 25 27H15C12 19 13 10 20 5Z"/><circle cx="20" cy="15" r="3"/><path d="M15 21L10 27H15M25 21L30 27H25M18 30L20 35L22 30"/></g><g id="destello"><path d="M20 6C21 15 25 19 34 20C25 21 21 25 20 34C19 25 15 21 6 20C15 19 19 15 20 6Z"/></g><g id="palomitas"><path d="M4 21L10.5 27.5L22 13M14 25L16.5 27.5L28 13"/></g><g id="megafono"><path d="M8 16H13L28 9V31L13 24H8Z"/><path d="M13 24L15 31H19L17 25"/><path d="M32 15C34 17 34 23 32 25"/></g><g id="microfono"><rect x="15" y="6" width="10" height="17" rx="5"/><path d="M10 19A10 10 0 0 0 30 19"/><path d="M20 29V34M15 34H25"/></g><g id="etiqueta"><path d="M7 21L19 9H31V21L19 33Z"/><circle cx="26" cy="14" r="2.2"/></g><g id="carrito"><path d="M5 9H10L14 26H30L33 14H12"/><circle cx="16" cy="31" r="2"/><circle cx="28" cy="31" r="2"/></g><g id="luna"><path d="M24 6A14 14 0 1 0 34 25A11 11 0 0 1 24 6Z"/></g><g id="chile"><path d="M10 12C14 12 15 16 18 20C21 25 27 30 33 31C26 34 16 32 11 24C8 19 8 14 10 12Z"/><path d="M10 12C9 9 10 7 13 6"/></g><g id="bolsa"><path d="M9 14H31L29 34H11Z"/><path d="M15 18V12A5 5 0 0 1 25 12V18"/></g><g id="grafica"><path d="M8 33H33M12 33V24M19 33V18M26 33V21"/><path d="M10 15L17 9L22 12L31 5M26 5H31V10"/></g><g id="gato"><path d="M9 33V16L12 7L17 13H23L28 7L31 16V33Z"/><circle cx="16" cy="21" r=".9"/><circle cx="24" cy="21" r=".9"/><path d="M18.5 25L20 26.5L21.5 25M6 24H12M6 28H12M28 24H34M28 28H34"/></g><g id="planta"><path d="M12 24H28L26 34H14Z"/><path d="M20 24V14"/><path d="M20 18C15 18 13 14 13 10C18 10 20 13 20 18Z"/><path d="M20 15C25 15 27 11 27 7C22 7 20 10 20 15Z"/></g><g id="globo"><path d="M20 26C13 26 10 20 10 15A10 10 0 0 1 30 15C30 20 27 26 20 26Z"/><path d="M18 26L20 29L22 26"/><path d="M20 29C18 32 22 33 20 36"/></g><g id="dona"><circle cx="20" cy="20" r="13"/><circle cx="20" cy="20" r="4.5"/><path d="M12 14L13.5 15M27 13L25.5 14.5M13 26L14.5 25M26 27L27 25.5M20 9.5V11"/></g><g id="candado"><rect x="9" y="18" width="22" height="16" rx="3"/><path d="M14 18V13A6 6 0 0 1 26 13V18"/><path d="M20 24V28"/></g><g id="rayo"><path d="M22 5L10 22H19L17 35L30 17H21Z"/></g><g id="carnero"><path d="M15 16C15 14 17 13 20 13C23 13 25 14 25 16L24 27C23.5 30 22 32 20 32C18 32 16.5 30 16 27Z"/><path d="M15.5 15C11 10 4 13 5 Line truncated
|
||||
|
After Width: | Height: | Size: 22 KiB |
@@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow: /
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* 048 — Service worker de la app instalable.
|
||||
*
|
||||
* Mínimo a propósito. NO guarda nada: ni páginas ni datos de clientes en el
|
||||
* dispositivo. Un CRM que enseña conversaciones viejas como si fueran actuales
|
||||
* es peor que uno que dice «sin conexión», y un celular se pierde.
|
||||
*
|
||||
* Hace cuatro cosas:
|
||||
* 1. se activa enseguida, sin esperar a que se cierren las pestañas viejas;
|
||||
* 2. si una NAVEGACIÓN falla por falta de red, responde la página de abajo;
|
||||
* 3. todo lo demás (API, SSE, adjuntos, assets) ni lo toca: va a la red;
|
||||
* 4. (056) al tocar un aviso del sistema, trae Vocero al frente con esa
|
||||
* conversación abierta.
|
||||
*
|
||||
* White-label: la página no lleva el nombre de nadie.
|
||||
*/
|
||||
|
||||
const PAGINA_SIN_CONEXION = `<!doctype html>
|
||||
<html lang="es">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Sin conexión</title>
|
||||
<style>
|
||||
:root { color-scheme: light dark; --bg: #ffffff; --text: #0a1730; --muted: #4b5875; }
|
||||
@media (prefers-color-scheme: dark) { :root { --bg: #0b1327; --text: #e8eefb; --muted: #a7b3cc; } }
|
||||
html, body { height: 100%; margin: 0; }
|
||||
body { display: flex; align-items: center; justify-content: center; padding: 24px; box-sizing: border-box;
|
||||
background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
|
||||
main { max-width: 22rem; text-align: center; }
|
||||
h1 { font-size: 1.25rem; margin: 0 0 .5rem; }
|
||||
p { margin: 0 0 1.25rem; color: var(--muted); }
|
||||
button { font: inherit; font-weight: 600; padding: .6rem 1.2rem; border-radius: 10px; border: 0;
|
||||
/* El mismo azul en los dos temas: con blanco encima pasa AA (5,3:1). */
|
||||
background: #0d5bff; color: #ffffff; cursor: pointer; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<h1>Sin conexión</h1>
|
||||
<p>No hay internet en este momento. Tus conversaciones siguen guardadas en el servidor y aparecen en cuanto vuelva la red.</p>
|
||||
<button type="button" onclick="location.reload()">Reintentar</button>
|
||||
</main>
|
||||
</body>
|
||||
</html>`;
|
||||
|
||||
self.addEventListener("install", () => {
|
||||
self.skipWaiting();
|
||||
});
|
||||
|
||||
self.addEventListener("activate", (event) => {
|
||||
event.waitUntil(self.clients.claim());
|
||||
});
|
||||
|
||||
self.addEventListener("fetch", (event) => {
|
||||
// Solo navegaciones: el resto sigue su camino sin pasar por aquí.
|
||||
if (event.request.mode !== "navigate") return;
|
||||
event.respondWith(
|
||||
fetch(event.request).catch(
|
||||
() =>
|
||||
new Response(PAGINA_SIN_CONEXION, {
|
||||
status: 503,
|
||||
headers: { "content-type": "text/html; charset=utf-8", "cache-control": "no-store" },
|
||||
})
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
// 056 — Tocar un aviso: la ventana de Vocero que ya esté abierta pasa al
|
||||
// frente y abre la conversación; si no hay ninguna, se abre una. Solo rutas de
|
||||
// la Bandeja: un `data.url` manipulado no saca al operador a otro sitio.
|
||||
self.addEventListener("notificationclick", (event) => {
|
||||
event.notification.close();
|
||||
const pedida = event.notification.data && event.notification.data.url;
|
||||
const url =
|
||||
typeof pedida === "string" && /^\/inbox(\?(conversation=[\w%-]+(&vista=esperando)?|vista=esperando))?$/.test(pedida) ? pedida : "/inbox";
|
||||
event.waitUntil(
|
||||
(async () => {
|
||||
const ventanas = await self.clients.matchAll({ type: "window", includeUncontrolled: true });
|
||||
const propia = ventanas.find((c) => new URL(c.url).origin === self.location.origin);
|
||||
if (propia) {
|
||||
await propia.focus();
|
||||
propia.postMessage({ tipo: "abrir", url });
|
||||
return;
|
||||
}
|
||||
await self.clients.openWindow(url);
|
||||
})()
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user