TeaSpeak-Client/modules/core/render-backend/index.ts

29 lines
1.0 KiB
TypeScript
Raw Normal View History

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