From 51f64921a53d950dd5cfc478f856a0a7e02e624e Mon Sep 17 00:00:00 2001 From: consultoria-as Date: Tue, 26 May 2026 07:41:38 +0000 Subject: [PATCH] fix: theme flash + language persistence on navigation - Remove setTimeout re-application of theme in app-init.js that caused flash - Fix quotations.html: add missing i18n.js and correct script load order - Fix whatsapp.html: add missing app-init.js before sidebar.js - Ensure i18n.js always loads before sidebar.js for proper translation --- pos/static/js/app-init.js | 6 ------ pos/templates/quotations.html | 3 ++- pos/templates/whatsapp.html | 1 + 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pos/static/js/app-init.js b/pos/static/js/app-init.js index 97f2a05..92d6b21 100644 --- a/pos/static/js/app-init.js +++ b/pos/static/js/app-init.js @@ -167,12 +167,6 @@ }); } - // Also prevent any DOMContentLoaded theme switchers from overriding - // by re-applying our saved theme after a tick - setTimeout(function() { - document.documentElement.setAttribute('data-theme', savedTheme); - }, 100); - // ─── Expose globally ─── window.POS_USER = { name: name, diff --git a/pos/templates/quotations.html b/pos/templates/quotations.html index 9ed0795..c950005 100644 --- a/pos/templates/quotations.html +++ b/pos/templates/quotations.html @@ -14,8 +14,9 @@ - + +

Cotizaciones

diff --git a/pos/templates/whatsapp.html b/pos/templates/whatsapp.html index 32c4a78..2701d33 100644 --- a/pos/templates/whatsapp.html +++ b/pos/templates/whatsapp.html @@ -131,6 +131,7 @@ function posLogout(){localStorage.removeItem('pos_token');window.location.href=' +