v1.8.6: branding — colors apply instantly, logo upload with size control, fix tracking width

This commit is contained in:
2026-05-28 19:48:25 +00:00
parent 881c3617da
commit 8e7b1f5938
17 changed files with 175 additions and 16 deletions
+8 -2
View File
@@ -371,8 +371,14 @@ let currentUser = null;
// ── Branding ──────────────────────────────────────────────────────────────────
fetch('/branding').then(r=>r.json()).then(b=>{
if(b.site_name){document.title=b.site_name;document.getElementById('brand-name').textContent=b.site_name;}
if(b.site_subtitle) document.getElementById('brand-sub').textContent=b.site_subtitle;
if(b.site_name){document.title=b.site_name;const bn=document.getElementById('brand-name');if(bn)bn.textContent=b.site_name;}
if(b.site_subtitle){const bs=document.getElementById('brand-sub');if(bs)bs.textContent=b.site_subtitle;}
if(b.primary_color) document.documentElement.style.setProperty('--primary', b.primary_color);
if(b.secondary_color) document.documentElement.style.setProperty('--secondary', b.secondary_color);
if(b.logo_url){
const logo=document.getElementById('brand-logo');
if(logo){logo.src=b.logo_url;logo.style.height=(b.logo_size||'40')+'px';logo.classList.remove('hidden');}
}
}).catch(()=>{});
// ── Counter animation ─────────────────────────────────────────────────────────