screentinker/frontend/js
ScreenTinker 281a735e84 Fix white-label settings not applying on page load
Root cause: the Settings page loaded /api/white-label into the form
inputs but never applied the saved values (primary_color, bg_color,
brand_name, favicon, custom_css) to the actual document. Nothing in
app.js bootstrap touched branding. So the save hit the DB correctly,
reload kept the DB value correctly, but the page always rendered the
hardcoded defaults from css/variables.css and the static "ScreenTinker"
label in index.html — which looked like the save had reverted.

Fix: new frontend/js/branding.js module that fetches /api/white-label
once at startup (app.js) and applies values to:
  - --accent and --bg-primary CSS vars
  - document.title and the .sidebar-header .logo span text
  - all <link rel="icon">/apple-touch-icon hrefs
  - a <style id="wl-custom-css"> tag for custom_css
  - the theme-color meta tag

Settings save now calls resetBranding() after POST so changes apply
immediately without a reload.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-22 19:36:20 -05:00
..
components QA fixes: toast aria-live + scope playlist flex-wrap to mobile 2026-04-21 16:00:41 -05:00
views Fix white-label settings not applying on page load 2026-04-22 19:36:20 -05:00
api.js Settings: add account profile + password change UI 2026-04-21 19:13:20 -05:00
app.js Fix white-label settings not applying on page load 2026-04-22 19:36:20 -05:00
branding.js Fix white-label settings not applying on page load 2026-04-22 19:36:20 -05:00
i18n.js Initial open source release 2026-04-08 12:14:53 -05:00
socket.js Initial open source release 2026-04-08 12:14:53 -05:00
utils.js Security audit remediation: auth, IDOR, XSS, hardening 2026-04-11 22:48:07 -05:00