2019-10-26 01:51:40 +02:00
|
|
|
import "./menu";
|
|
|
|
|
|
|
|
import * as electron from "electron";
|
|
|
|
import ipcMain = electron.ipcMain;
|
|
|
|
import BrowserWindow = electron.BrowserWindow;
|
|
|
|
|
2020-12-02 18:08:49 +01:00
|
|
|
import {openChangeLog as open_changelog} from "../app-updater/changelog";
|
2019-10-26 01:51:40 +02:00
|
|
|
import * as updater from "../app-updater";
|
2020-10-01 10:56:22 +02:00
|
|
|
import {execute_connect_urls} from "../MultiInstanceHandler";
|
|
|
|
import {processArguments} from "../../shared/process-arguments";
|
2020-08-23 21:26:27 +02:00
|
|
|
|
|
|
|
import "./ExternalModal";
|
2020-12-02 18:08:49 +01:00
|
|
|
import {showUpdateWindow} from "../windows/client-updater/controller/ClientUpdate";
|
2019-10-26 01:51:40 +02:00
|
|
|
|
|
|
|
ipcMain.on('basic-action', (event, action, ...args: any[]) => {
|
|
|
|
const window = BrowserWindow.fromWebContents(event.sender);
|
|
|
|
|
2019-11-24 18:38:50 +01:00
|
|
|
if(action == "parse-connect-arguments") {
|
2020-10-01 10:56:22 +02:00
|
|
|
execute_connect_urls(processArguments["_"] || []);
|
2019-11-24 18:38:50 +01:00
|
|
|
} else if(action === "open-changelog") {
|
2019-10-26 01:51:40 +02:00
|
|
|
open_changelog();
|
|
|
|
} else if(action === "check-native-update") {
|
2020-12-02 18:08:49 +01:00
|
|
|
showUpdateWindow().then(undefined);
|
2019-10-26 01:51:40 +02:00
|
|
|
} else if(action === "open-dev-tools") {
|
|
|
|
window.webContents.openDevTools();
|
|
|
|
} else if(action === "reload-window") {
|
|
|
|
window.reload();
|
|
|
|
}
|
2020-08-21 13:37:10 +02:00
|
|
|
});
|