mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-20 03:25:56 +00:00
fix(modules): show tbc-content and wotlk-content only when content-scaling is installed
This commit is contained in:
1 parent
d736bc0c47
commit
223dc56c7d
2 files changed
+22
-3
No files matched your search
@@ -902,7 +902,16 @@ export function ModulesPage({
|
||||
URL.revokeObjectURL(url);
|
||||
}
|
||||
|
||||
const installedModules = modules?.filter((m) => m.installed) ?? [];
|
||||
const isScalingInstalled = Boolean(
|
||||
modules?.some((m) => m.id === "content-scaling" && m.installed)
|
||||
);
|
||||
|
||||
const installedModules = (modules?.filter((m) => m.installed) ?? []).filter((m) => {
|
||||
if (m.id === "tbc-content" || m.id === "wotlk-content") {
|
||||
return isScalingInstalled;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
const selectedModule = modules?.find((m) => m.id === openSettings) ?? null;
|
||||
const selectedModuleIndex = installedModules.findIndex((m) => m.id === openSettings);
|
||||
|
||||
|
||||
Reference in new issue
Block a user