Fixed Dashboard [deploy]

This commit is contained in:
Pascal Prießnitz
2025-12-03 00:40:43 +01:00
parent a6a1654a9a
commit 078eb47b25
2 changed files with 14 additions and 12 deletions

View File

@@ -12,7 +12,7 @@ required.forEach((key) => {
}); });
const normalizeBasePath = (raw?: string) => { const normalizeBasePath = (raw?: string) => {
if (!raw) return ''; if (!raw) return '/ucp';
const withSlash = raw.startsWith('/') ? raw : `/${raw}`; const withSlash = raw.startsWith('/') ? raw : `/${raw}`;
return withSlash.replace(/\/+$/, ''); return withSlash.replace(/\/+$/, '');
}; };

View File

@@ -1603,7 +1603,7 @@ router.get('/', (req, res) => {
modulesCache['statuspageEnabled'] = cfg.statuspageEnabled !== false && cfg.automodConfig?.statuspageEnabled !== false; modulesCache['statuspageEnabled'] = cfg.statuspageEnabled !== false && cfg.automodConfig?.statuspageEnabled !== false;
modulesCache['birthdayEnabled'] = cfg.birthdayEnabled !== false && cfg.birthdayConfig?.enabled !== false; modulesCache['birthdayEnabled'] = cfg.birthdayEnabled !== false && cfg.birthdayConfig?.enabled !== false;
modulesCache['reactionRolesEnabled'] = cfg.reactionRolesEnabled !== false && cfg.reactionRolesConfig?.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 || {}; dynamicVoiceCache = cfg.dynamicVoiceConfig || {};
applyNavVisibility(); applyNavVisibility();
await loadAutomodSettings(guildId); await loadAutomodSettings(guildId);
@@ -2093,6 +2093,7 @@ router.get('/', (req, res) => {
if (m.key === 'statuspageEnabled') modulesCache['statuspageEnabled'] = willEnable; if (m.key === 'statuspageEnabled') modulesCache['statuspageEnabled'] = willEnable;
if (m.key === 'birthdayEnabled') modulesCache['birthdayEnabled'] = willEnable; if (m.key === 'birthdayEnabled') modulesCache['birthdayEnabled'] = willEnable;
if (m.key === 'reactionRolesEnabled') modulesCache['reactionRolesEnabled'] = willEnable; if (m.key === 'reactionRolesEnabled') modulesCache['reactionRolesEnabled'] = willEnable;
if (m.key === 'eventsEnabled') modulesCache['eventsEnabled'] = willEnable;
applyNavVisibility(); applyNavVisibility();
} else { } else {
showToast('Speichern fehlgeschlagen', true); showToast('Speichern fehlgeschlagen', true);
@@ -2108,6 +2109,7 @@ router.get('/', (req, res) => {
if (m.key === 'statuspageEnabled') statuspageActive = !!m.enabled; if (m.key === 'statuspageEnabled') statuspageActive = !!m.enabled;
if (m.key === 'birthdayEnabled') birthdayActive = !!m.enabled; if (m.key === 'birthdayEnabled') birthdayActive = !!m.enabled;
if (m.key === 'reactionRolesEnabled') reactionRolesActive = !!m.enabled; if (m.key === 'reactionRolesEnabled') reactionRolesActive = !!m.enabled;
if (m.key === 'eventsEnabled') eventsActive = !!m.enabled;
}); });
applyNavVisibility(); applyNavVisibility();
applyTicketsVisibility(ticketsActive); applyTicketsVisibility(ticketsActive);