Make onboarding tour install-wide instead of per-browser
Persist onboardingCompleted flag server-side via /api/v1/config so the tour only auto-starts once per DashCaddy installation, not on every new browser that connects. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -35,9 +35,10 @@ const SITE = {
|
||||
configurationType: (_cachedCfg && _cachedCfg.configurationType) || 'homelab',
|
||||
domain: (_cachedCfg && _cachedCfg.domain) || '',
|
||||
defaults: (_cachedCfg && _cachedCfg.defaults) || {},
|
||||
routingMode: (_cachedCfg && _cachedCfg.routingMode) || 'subdomain'
|
||||
routingMode: (_cachedCfg && _cachedCfg.routingMode) || 'subdomain',
|
||||
onboardingCompleted: false
|
||||
};
|
||||
(async function loadSiteConfig() {
|
||||
window.__dashcaddySiteConfigLoaded = (async function loadSiteConfig() {
|
||||
try {
|
||||
const r = await fetch('/api/v1/config');
|
||||
if (r.ok) {
|
||||
@@ -56,6 +57,7 @@ const SITE = {
|
||||
if (c.domain) SITE.domain = c.domain;
|
||||
if (c.defaults) SITE.defaults = c.defaults;
|
||||
if (c.routingMode) SITE.routingMode = c.routingMode;
|
||||
SITE.onboardingCompleted = c.onboardingCompleted === true;
|
||||
// Cache only non-sensitive display config (TLD, domain, routing mode)
|
||||
// DNS IPs and server topology are NOT cached — fetched from API each load
|
||||
localStorage.setItem('dashcaddy_site_config', JSON.stringify({
|
||||
|
||||
Reference in New Issue
Block a user