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
This commit is contained in:
Michael Telatynski
2022-07-01 20:17:40 +01:00
committed by GitHub
parent b7a0402de5
commit 389f6f4334
10 changed files with 794 additions and 691 deletions
+21 -1
View File
@@ -1,5 +1,5 @@
/*
Copyright 2021 New Vector Ltd
Copyright 2021 - 2022 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,12 +15,32 @@ limitations under the License.
*/
import { BrowserWindow } from "electron";
import Store from "electron-store";
import AutoLaunch from "auto-launch";
import { AppLocalization } from "../language-helper";
declare global {
namespace NodeJS {
interface Global {
mainWindow: BrowserWindow;
appQuitting: boolean;
appLocalization: AppLocalization;
launcher: AutoLaunch;
vectorConfig: Record<string, any>;
trayConfig: {
// eslint-disable-next-line camelcase
icon_path: string;
brand: string;
};
store: Store<{
warnBeforeExit?: boolean;
minimizeToTray?: boolean;
spellCheckerEnabled?: boolean;
autoHideMenuBar?: boolean;
locale?: string | string[];
disableHardwareAcceleration?: boolean;
}>;
}
}
}