aboutsummaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2022-02-08 21:13:20 +0100
committerGitHub <noreply@github.com>2022-02-08 21:13:20 +0100
commit1bd83cf1a72332e142bb63acab47ac3877061875 (patch)
tree5670e225378ebcb0e73efb0c84265357f74f00cb /src/index.js
parentd55f84536814238d8ea79acdae47dbdf269953f1 (diff)
parente2aa874f48dc585f0d67c5655df234bdf356cc53 (diff)
downloadViper-1bd83cf1a72332e142bb63acab47ac3877061875.tar.gz
Viper-1bd83cf1a72332e142bb63acab47ac3877061875.zip
Merge branch 'main' into thunderstore
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/index.js b/src/index.js
index a0cb4db..a06cf69 100644
--- a/src/index.js
+++ b/src/index.js
@@ -8,7 +8,7 @@ const events = new Emitter();
const utils = require("./utils");
const cli = require("./cli");
-const requests = require("./requests");
+const requests = require("./extras/requests");
// Starts the actual BrowserWindow, which is only run when using the
// GUI, for the CLI this function is never called.
@@ -91,9 +91,13 @@ ipcMain.on("launchVanilla", (event) => {utils.launch("vanilla")})
ipcMain.on("update", (event) => {utils.update()})
ipcMain.on("setpathcli", (event) => {utils.setpath()});
ipcMain.on("setpath", (event, value) => {
- if (!value) {
- utils.setpath(win);
- } else if (!win.isVisible()) {
+ if (! value) {
+ if (! win.isVisible()) {
+ utils.setpath(win);
+ } else {
+ utils.setpath(win, true);
+ }
+ } else if (! win.isVisible()) {
win.show();
}
});