diff options
author | Delta <31860825+AA-Delta@users.noreply.github.com> | 2022-01-25 18:29:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-25 18:29:46 -0500 |
commit | 6469020960576b9e4f62c0c308eb5a055a696daa (patch) | |
tree | afb0172e5d4a6c4b9e4644513e012fde9efe65f5 /src/index.js | |
parent | 353db2c99fd26c3c925247b61b30619020a12b5a (diff) | |
parent | 66204f6f58dc90e1e9ee40c7ea691927d0c50b8d (diff) | |
download | Viper-6469020960576b9e4f62c0c308eb5a055a696daa.tar.gz Viper-6469020960576b9e4f62c0c308eb5a055a696daa.zip |
Update/Merge main from Viper's repo
PR to merge to fork
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/index.js b/src/index.js index 3f50840..c8bfc53 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. @@ -87,9 +87,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(); } }); |