Skip to content

Commit 389f6f4

Browse files
authored
Split electron-main into smaller chunks (#377)
* Split electron-main into smaller chunks * Affix @types/node version and upgrade electron-store * Iterate PR * tidy up * Actually run the split out code
1 parent b7a0402 commit 389f6f4

File tree

10 files changed

+794
-691
lines changed

10 files changed

+794
-691
lines changed

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"dependencies": {
4343
"auto-launch": "^5.0.5",
4444
"counterpart": "^0.18.6",
45-
"electron-store": "^6.0.1",
45+
"electron-store": "^8.0.2",
4646
"electron-window-state": "^5.0.3",
4747
"minimist": "^1.2.6",
4848
"png-to-ico": "^2.1.1",
@@ -88,6 +88,9 @@
8888
"matrix-seshat": "^2.3.3",
8989
"keytar": "^7.9.0"
9090
},
91+
"resolutions": {
92+
"@types/node": "16.11.38"
93+
},
9194
"build": {
9295
"appId": "im.riot.app",
9396
"asarUnpack": "**/*.node",

src/@types/global.d.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2021 New Vector Ltd
2+
Copyright 2021 - 2022 New Vector Ltd
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -15,12 +15,32 @@ limitations under the License.
1515
*/
1616

1717
import { BrowserWindow } from "electron";
18+
import Store from "electron-store";
19+
import AutoLaunch from "auto-launch";
20+
21+
import { AppLocalization } from "../language-helper";
1822

1923
declare global {
2024
namespace NodeJS {
2125
interface Global {
2226
mainWindow: BrowserWindow;
2327
appQuitting: boolean;
28+
appLocalization: AppLocalization;
29+
launcher: AutoLaunch;
30+
vectorConfig: Record<string, any>;
31+
trayConfig: {
32+
// eslint-disable-next-line camelcase
33+
icon_path: string;
34+
brand: string;
35+
};
36+
store: Store<{
37+
warnBeforeExit?: boolean;
38+
minimizeToTray?: boolean;
39+
spellCheckerEnabled?: boolean;
40+
autoHideMenuBar?: boolean;
41+
locale?: string | string[];
42+
disableHardwareAcceleration?: boolean;
43+
}>;
2444
}
2545
}
2646
}

0 commit comments

Comments
 (0)