Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
theripper93 committed Jan 22, 2024
1 parent 312a468 commit 41d4e44
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"background": "",
"backgroundColor": "#003049ff",
"textColor": "#eae2b7ff",
"accentColor": "#f77f00ff"
"accentColor": "#f77f00ff",
"ignoreCertificateErrors": false
}
6 changes: 5 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,11 @@ ipcMain.handle("app-version", () => app.getVersion())
ipcMain.handle("app-config", () => {
try {
const json = fs.readFileSync(path.join(app.getAppPath(), "config.json")).toString();
return JSON.parse(json) as AppConfig;
const appConfig = JSON.parse(json) as AppConfig;
if (appConfig.ignoreCertificateErrors) {
app.commandLine.appendSwitch("ignore-certificate-errors");
}
return appConfig;
} catch (e) {
return {} as AppConfig;
}
Expand Down
1 change: 1 addition & 0 deletions src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type AppConfig = {
accentColor: string;
cachePath?: string;
autoCacheClear?: boolean;
ignoreCertificateErrors?: boolean;
}


Expand Down

0 comments on commit 41d4e44

Please sign in to comment.