From 078eb47b25668d731c6567c5fe4e6062d7a8e410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20Prie=C3=9Fnitz?= Date: Wed, 3 Dec 2025 00:40:43 +0100 Subject: [PATCH] Fixed Dashboard [deploy] --- src/config/env.ts | 2 +- src/web/routes/dashboard.ts | 24 +++++++++++++----------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/config/env.ts b/src/config/env.ts index 5d71fd8..246a9e9 100644 --- a/src/config/env.ts +++ b/src/config/env.ts @@ -12,7 +12,7 @@ required.forEach((key) => { }); const normalizeBasePath = (raw?: string) => { - if (!raw) return ''; + if (!raw) return '/ucp'; const withSlash = raw.startsWith('/') ? raw : `/${raw}`; return withSlash.replace(/\/+$/, ''); }; diff --git a/src/web/routes/dashboard.ts b/src/web/routes/dashboard.ts index 9d85e4a..066f62e 100644 --- a/src/web/routes/dashboard.ts +++ b/src/web/routes/dashboard.ts @@ -1603,7 +1603,7 @@ router.get('/', (req, res) => { modulesCache['statuspageEnabled'] = cfg.statuspageEnabled !== false && cfg.automodConfig?.statuspageEnabled !== false; modulesCache['birthdayEnabled'] = cfg.birthdayEnabled !== false && cfg.birthdayConfig?.enabled !== false; modulesCache['reactionRolesEnabled'] = cfg.reactionRolesEnabled !== false && cfg.reactionRolesConfig?.enabled !== false; - modulesCache['eventsEnabled'] = (cfg as any).eventsEnabled !== false; + modulesCache['eventsEnabled'] = cfg.eventsEnabled !== false; dynamicVoiceCache = cfg.dynamicVoiceConfig || {}; applyNavVisibility(); await loadAutomodSettings(guildId); @@ -2088,16 +2088,17 @@ router.get('/', (req, res) => { showToast(willEnable ? m.name + ' aktiviert' : m.name + ' deaktiviert'); modulesCache[m.key] = willEnable; if (m.key === 'ticketsEnabled') applyTicketsVisibility(willEnable); - if (m.key === 'automodEnabled') modulesCache['automodEnabled'] = willEnable; - if (m.key === 'welcomeEnabled') modulesCache['welcomeEnabled'] = willEnable; - if (m.key === 'statuspageEnabled') modulesCache['statuspageEnabled'] = willEnable; - if (m.key === 'birthdayEnabled') modulesCache['birthdayEnabled'] = willEnable; - if (m.key === 'reactionRolesEnabled') modulesCache['reactionRolesEnabled'] = willEnable; - applyNavVisibility(); - } else { - showToast('Speichern fehlgeschlagen', true); - } - }); + if (m.key === 'automodEnabled') modulesCache['automodEnabled'] = willEnable; + if (m.key === 'welcomeEnabled') modulesCache['welcomeEnabled'] = willEnable; + if (m.key === 'statuspageEnabled') modulesCache['statuspageEnabled'] = willEnable; + if (m.key === 'birthdayEnabled') modulesCache['birthdayEnabled'] = willEnable; + if (m.key === 'reactionRolesEnabled') modulesCache['reactionRolesEnabled'] = willEnable; + if (m.key === 'eventsEnabled') modulesCache['eventsEnabled'] = willEnable; + applyNavVisibility(); + } else { + showToast('Speichern fehlgeschlagen', true); + } + }); row.appendChild(meta); row.appendChild(toggle); list.appendChild(row); @@ -2108,6 +2109,7 @@ router.get('/', (req, res) => { if (m.key === 'statuspageEnabled') statuspageActive = !!m.enabled; if (m.key === 'birthdayEnabled') birthdayActive = !!m.enabled; if (m.key === 'reactionRolesEnabled') reactionRolesActive = !!m.enabled; + if (m.key === 'eventsEnabled') eventsActive = !!m.enabled; }); applyNavVisibility(); applyTicketsVisibility(ticketsActive);