Fixed Dashboard [deploy]
This commit is contained in:
@@ -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(/\/+$/, '');
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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);
|
||||||
@@ -2088,16 +2088,17 @@ router.get('/', (req, res) => {
|
|||||||
showToast(willEnable ? m.name + ' aktiviert' : m.name + ' deaktiviert');
|
showToast(willEnable ? m.name + ' aktiviert' : m.name + ' deaktiviert');
|
||||||
modulesCache[m.key] = willEnable;
|
modulesCache[m.key] = willEnable;
|
||||||
if (m.key === 'ticketsEnabled') applyTicketsVisibility(willEnable);
|
if (m.key === 'ticketsEnabled') applyTicketsVisibility(willEnable);
|
||||||
if (m.key === 'automodEnabled') modulesCache['automodEnabled'] = willEnable;
|
if (m.key === 'automodEnabled') modulesCache['automodEnabled'] = willEnable;
|
||||||
if (m.key === 'welcomeEnabled') modulesCache['welcomeEnabled'] = willEnable;
|
if (m.key === 'welcomeEnabled') modulesCache['welcomeEnabled'] = willEnable;
|
||||||
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;
|
||||||
applyNavVisibility();
|
if (m.key === 'eventsEnabled') modulesCache['eventsEnabled'] = willEnable;
|
||||||
} else {
|
applyNavVisibility();
|
||||||
showToast('Speichern fehlgeschlagen', true);
|
} else {
|
||||||
}
|
showToast('Speichern fehlgeschlagen', true);
|
||||||
});
|
}
|
||||||
|
});
|
||||||
row.appendChild(meta);
|
row.appendChild(meta);
|
||||||
row.appendChild(toggle);
|
row.appendChild(toggle);
|
||||||
list.appendChild(row);
|
list.appendChild(row);
|
||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user