()
| 8 | |
| 9 | // System persistence configuration table |
| 10 | export 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 | |
| 23 | export function saveSystemConfig(_systemConfig: SystemConfig) { |
| 24 | StorageSystem.store("SystemConfig", "config", _systemConfig); |
no test coverage detected