diff options
Diffstat (limited to 'src/app/main.js')
-rw-r--r-- | src/app/main.js | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/app/main.js b/src/app/main.js index d132c35..647e5cd 100644 --- a/src/app/main.js +++ b/src/app/main.js @@ -76,12 +76,12 @@ function launch() { update(); shouldInstallNorthstar = false; } else { - ipcRenderer.send("launch"); + ipcRenderer.send("launch-ns"); } } // Tells the main process to launch the vanilla game -function launchVanilla() {ipcRenderer.send("launchVanilla")} +function launchVanilla() {ipcRenderer.send("launch-vanilla")} // In conjunction with utils.js' winLog(), it'll send log messages in // the devTools from utils.js @@ -105,11 +105,11 @@ function setButtons(state) { disablearray(document.querySelectorAll("#browser #browserEntries .text button")); } -ipcRenderer.on("setbuttons", (event, state) => { +ipcRenderer.on("set-buttons", (event, state) => { setButtons(state); }) -ipcRenderer.on("gamepathlost", (event, state) => { +ipcRenderer.on("gamepath-lost", (event, state) => { page(0); setButtons(false); alert(lang("gui.gamepath.lost")); @@ -175,7 +175,7 @@ function selected(all) { } } - ipcRenderer.send("removemod", selected); + ipcRenderer.send("remove-mod", selected); }, toggle: () => { if (selected.match(/^Northstar\./)) { @@ -188,7 +188,7 @@ function selected(all) { } } - ipcRenderer.send("togglemod", selected); + ipcRenderer.send("toggle-mod", selected); } } } @@ -198,13 +198,13 @@ let installqueue = []; // Tells the main process to install a mod through the file selector function installmod() { setButtons(false); - ipcRenderer.send("installmod"); + ipcRenderer.send("install-mod"); } // Tells the main process to directly install a mod from this path function installFromPath(path) { setButtons(false); - ipcRenderer.send("installfrompath", path); + ipcRenderer.send("install-from-path", path); } // Tells the main process to install a mod from a URL @@ -238,7 +238,7 @@ function installFromURL(url, dependencies, clearqueue) { } setButtons(false); - ipcRenderer.send("installfromurl", url, dependencies); + ipcRenderer.send("install-from-url", url, dependencies); if (dependencies) { installqueue = dependencies; @@ -263,7 +263,7 @@ function isModInstalled(modname) { // Frontend part of settings a new game path ipcRenderer.on("newpath", (event, newpath) => { settings.gamepath = newpath; - ipcRenderer.send("guigetmods"); + ipcRenderer.send("gui-getmods"); }) // Continuation of log() @@ -311,23 +311,23 @@ ipcRenderer.on("version", (event, versions) => { shouldInstallNorthstar = true; playNsBtn.innerText = lang("gui.installnorthstar"); } -}); ipcRenderer.send("getversion"); +}); ipcRenderer.send("get-version"); // When an update is available it'll ask the user about it -ipcRenderer.on("updateavailable", () => { +ipcRenderer.on("update-available", () => { if (confirm(lang("gui.update.available"))) { - ipcRenderer.send("updatenow"); + ipcRenderer.send("update-now"); } }) // Error out when no game path is set -ipcRenderer.on("nopathselected", () => { +ipcRenderer.on("no-path-selected", () => { alert(lang("gui.gamepath.must")); exit(); }); // Error out when game path is wrong -ipcRenderer.on("wrongpath", () => { +ipcRenderer.on("wrong-path", () => { alert(lang("gui.gamepath.wrong")); setpath(false); }); |