MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / initSystemConfig

Function initSystemConfig

panel/src/app/setting.ts:10–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8
9// System persistence configuration table
10export function initSystemConfig() {
11 systemConfig = StorageSystem.load("SystemConfig", SystemConfig, "config");
12 if (!systemConfig) {
13 systemConfig = new SystemConfig();
14 StorageSystem.store("SystemConfig", "config", systemConfig);
15 }
16 if (systemConfig.language) i18next.changeLanguage(systemConfig.language);
17 if (!systemConfig.panelId) {
18 systemConfig.panelId = v4();
19 saveSystemConfig(systemConfig);
20 }
21}
22
23export function saveSystemConfig(_systemConfig: SystemConfig) {
24 StorageSystem.store("SystemConfig", "config", _systemConfig);

Callers 1

mainFunction · 0.90

Calls 3

saveSystemConfigFunction · 0.85
loadMethod · 0.65
storeMethod · 0.65

Tested by

no test coverage detected