mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-21 03:25:56 +00:00
Keep SQUID settings usable with unknown metadata and preserve translations
This commit is contained in:
1 parent
f8301d7394
commit
654b7cddd3
6 files changed
+60
-16
No files matched your search
@@ -42,6 +42,6 @@ export function squidSettingsView(items: ModuleSetting[], locale: Locale): Setti
|
||||
};
|
||||
});
|
||||
const categories = new Map(groups.map(g => [g.id, g.titles[languages.indexOf(locale)]]));
|
||||
for (const item of items) if (item.field?.group) categories.set("squid." + item.field.group, item.field.group_title ?? categories.get("squid." + item.field.group) ?? item.field.group);
|
||||
for (const item of items) if (item.field?.group) categories.set("squid." + item.field.group, categories.get("squid." + item.field.group) ?? item.field.group_title ?? item.field.group);
|
||||
return { scope: "bots", categories: [...categories].map(([id, title]) => ({ id, title })), settings, unknown_keys: 0, drift_keys: [], files: ["Core/configs/modules/playerbots.conf"] };
|
||||
}
|
||||
Reference in new issue
Block a user