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) => {
if (!raw) return '';
if (!raw) return '/ucp';
const withSlash = raw.startsWith('/') ? raw : `/${raw}`;
return withSlash.replace(/\/+$/, '');
};

View File

@@ -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);