fix(config): ensure is_demo_mode is persisted in site.config.json and typed in SiteConfig interface

This commit is contained in:
Daniel S
2026-08-09 22:50:10 +02:00
parent aec7c78fb0
commit adefc89ab2
2 changed files with 5 additions and 1 deletions

View File

@@ -72,12 +72,13 @@ const presets = Object.values(THEME_PRESETS);
<textarea id="metaDescription" rows="2" class="w-full glass-panel bg-slate-950/60 rounded-xl p-3 text-xs text-white focus:outline-none focus:border-sky-400 resize-none">{siteConfig.metaDescription}</textarea>
</div>
<label class="flex items-center gap-3 pt-2 p-3 bg-amber-500/10 border border-amber-500/20 rounded-xl cursor-pointer">
<input type="checkbox" id="isDemoMode" checked={(siteConfig as any).is_demo_mode ?? false} class="rounded text-amber-400 focus:ring-0 h-4 w-4" />
<input type="checkbox" id="isDemoMode" checked={!!siteConfig.is_demo_mode} class="rounded text-amber-400 focus:ring-0 h-4 w-4" />
<div>
<span class="text-xs text-amber-400 font-bold block">🎭 Demo-Modus aktivieren</span>
<span class="text-[10px] text-slate-400">Zeigt einen festen Demo-Hinweis für Interessenten auf der Live-Website</span>
</div>
</label>
</div>
<h3 class="text-xs font-bold text-slate-400 uppercase tracking-wider pt-2 border-t border-white/10">Unternehmens-Stammdaten (Dynamic Data Binding)</h3>

View File

@@ -73,6 +73,7 @@ export interface SiteConfig {
sectionsOrder: string[];
sectionsDetails?: SectionConfig[];
is_demo_mode?: boolean;
site_info?: {
title?: string;
company_name?: string;
@@ -117,6 +118,8 @@ export interface SmtpConfig {
export const FALLBACK_SITE_CONFIG: SiteConfig = {
siteName: 'N&D IT Solutions',
metaDescription: 'High-Performance Webdesign & Digital Solutions - 100% DSGVO-konform.',
is_demo_mode: false,
header: {
brandName: 'N&D',
brandHighlight: 'i-t SOLUTIONS',