aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/app')
-rw-r--r--src/app/browser.js6
-rw-r--r--src/app/main.js30
-rw-r--r--src/app/settings.js2
3 files changed, 19 insertions, 19 deletions
diff --git a/src/app/browser.js b/src/app/browser.js
index 72ab24e..4b9f2e3 100644
--- a/src/app/browser.js
+++ b/src/app/browser.js
@@ -373,7 +373,7 @@ function BrowserEl(properties) {
browserEntries.appendChild(entry);
}
-ipcRenderer.on("removedmod", (event, mod) => {
+ipcRenderer.on("removed-mod", (event, mod) => {
setButtons(true);
Browser.setbutton(mod.name, lang("gui.browser.install"));
if (mod.manifestname) {
@@ -381,7 +381,7 @@ ipcRenderer.on("removedmod", (event, mod) => {
}
})
-ipcRenderer.on("failedmod", (event, modname) => {
+ipcRenderer.on("failed-mod", (event, modname) => {
setButtons(true);
new Toast({
timeout: 10000,
@@ -391,7 +391,7 @@ ipcRenderer.on("failedmod", (event, modname) => {
})
})
-ipcRenderer.on("installedmod", (event, mod) => {
+ipcRenderer.on("installed-mod", (event, mod) => {
setButtons(true);
Browser.setbutton(mod.name, lang("gui.browser.reinstall"));
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);
});
diff --git a/src/app/settings.js b/src/app/settings.js
index 051d6a1..63b4b99 100644
--- a/src/app/settings.js
+++ b/src/app/settings.js
@@ -22,7 +22,7 @@ var Settings = {
},
apply: () => {
settings = {...settings, ...Settings.get()};
- ipcRenderer.send("savesettings", Settings.get());
+ ipcRenderer.send("save-settings", Settings.get());
},
reloadSwitches: () => {
let switches = document.querySelectorAll(".switch");