Example electron test (#3408)

* example test mostly working

* add electron test to CI
This commit is contained in:
Kurt Hutten
2024-08-13 17:00:56 +10:00
committed by GitHub
parent d9feb92d70
commit 128c9cb3f8
5 changed files with 282 additions and 43 deletions

View File

@ -441,6 +441,15 @@ export const readAppSettingsFile = async () => {
}
const configToml = await window.electron.readFile(settingsPath)
const configObj = parseAppSettings(configToml)
const overrideJSON = localStorage.getItem('APP_SETTINGS_OVERRIDE')
if (overrideJSON) {
try {
const override = JSON.parse(overrideJSON)
configObj.app = { ...configObj.app, ...override }
} catch (e) {
console.error('Error parsing APP_SETTINGS_OVERRIDE:', e)
}
}
return configObj
}