mirror of
https://github.com/screentinker/screentinker.git
synced 2026-06-15 10:43:36 -06:00
The logo/title/theme/favicon are static 'ScreenTinker' in index.html, and applyBranding() only overrode them AFTER an async /api/white-label fetch - that network delay was the flash, on every load and on switch (which reloads). Now applyBranding caches the resolved white-label per workspace (keyed by the JWT's current_workspace_id), and a tiny same-origin brand-prime.js loads render-blocking right after the logo - so it applies the cached colors/name/ title/favicon/custom-css BEFORE first paint. CSP-safe (external 'self' script, not inline). applyBranding still runs to refresh + re-cache. First-ever visit to an uncached branded workspace still shows the default once; every load after is flash-free. |
||
|---|---|---|
| .. | ||
| components | ||
| i18n | ||
| views | ||
| api.js | ||
| app.js | ||
| brand-prime.js | ||
| branding.js | ||
| i18n.js | ||
| socket.js | ||
| utils.js | ||