aboutsummaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
authorDelta <31860825+AA-Delta@users.noreply.github.com>2022-01-25 18:32:40 -0500
committerGitHub <noreply@github.com>2022-01-25 18:32:40 -0500
commit1c17a26bddd819f2fc0f1b2164cae02d441181a3 (patch)
treeb41587176950fcd5f0ff1a661e7f255fd531d54e /src/index.js
parentdd1a4d50f590b127f0fd3404b063bc42cf29112b (diff)
parent6469020960576b9e4f62c0c308eb5a055a696daa (diff)
downloadViper-1c17a26bddd819f2fc0f1b2164cae02d441181a3.tar.gz
Viper-1c17a26bddd819f2fc0f1b2164cae02d441181a3.zip
Merge pull request #5 from AA-Delta/main
Update for translation
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 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();
}
});