From 61e94db0d33ff05e1c1344165715b4d83a0919b3 Mon Sep 17 00:00:00 2001 From: dadaloop82 Date: Mon, 27 Apr 2026 05:54:28 +0000 Subject: [PATCH] style: barcode suffix in banner title smaller + monospace --- assets/js/app.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index 08f0e18..ff48f40 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -2556,8 +2556,10 @@ function renderBannerItem() { const fin = entry.data; banner.className = 'alert-banner banner-finished'; iconEl.textContent = '📦'; - const barcodeSuffix = fin.barcode && fin.barcode.length >= 3 ? ' …' + fin.barcode.slice(-3) : ''; - titleEl.textContent = `${fin.name}${fin.brand ? ' (' + fin.brand + ')' : ''}${barcodeSuffix} — ${t('dashboard.banner_finished_title')}`; + const barcodeSuffix = fin.barcode && fin.barcode.length >= 3 + ? ` …${escapeHtml(fin.barcode.slice(-3))}` + : ''; + titleEl.innerHTML = `${escapeHtml(fin.name)}${fin.brand ? ' (' + escapeHtml(fin.brand) + ')' : ''}${barcodeSuffix} — ${escapeHtml(t('dashboard.banner_finished_title'))}`; const expectedText = fin.expected_qty ? ` Secondo le registrazioni dovresti averne ancora ${fin.expected_qty} ${fin.unit}.` : ''; detailEl.innerHTML = `L'inventario segna zero, ma i movimenti registrati dicono che non dovrebbe essere finito.${expectedText} Puoi controllare?`; let btns = ``;