mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
Add support for localConfig at $appData/config.json.
Move electron-config to $appData/electron-config.json Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
0d5e80cc51
commit
0e0c1cfad3
1 changed files with 9 additions and 1 deletions
|
@ -56,7 +56,15 @@ try {
|
|||
// Continue with the defaults (ie. an empty config)
|
||||
}
|
||||
|
||||
const store = new Store();
|
||||
try {
|
||||
// Load local config and use it to override values from the one baked with the build
|
||||
const localConfig = require(path.join(app.getPath('userData'), 'config.json'));
|
||||
vectorConfig = Object.assign(vectorConfig, localConfig);
|
||||
} catch (e) {
|
||||
// Could not load local config, this is expected in most cases.
|
||||
}
|
||||
|
||||
const store = new Store({ name: "electron-config" });
|
||||
|
||||
let mainWindow = null;
|
||||
global.appQuitting = false;
|
||||
|
|
Loading…
Reference in a new issue