aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2022-04-13 23:22:42 +0200
committer0neGal <mail@0negal.com>2022-04-13 23:28:24 +0200
commitcbcaafa35624c70e313c00232f78a366d05ef3a9 (patch)
treef537d951c54437b8d1a195348ef66f51112f6fcd /src/app
parente48c5d92d0bd113c680e53aa307ff6d440794007 (diff)
downloadViper-cbcaafa35624c70e313c00232f78a366d05ef3a9.tar.gz
Viper-cbcaafa35624c70e313c00232f78a366d05ef3a9.zip
check to make sure gamepath exists
When Viper starts up it'll check to make sure the gamepath still exists, and throws errors if not, it also redirects you to the first page (the one where you can set the gamepath), and gives you an informative error. This could happen because the user unmounted the drive the gamepath is on, or it could happen if the user moved their game location.
Diffstat (limited to 'src/app')
-rw-r--r--src/app/main.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/app/main.js b/src/app/main.js
index 9218ec7..70d1b0c 100644
--- a/src/app/main.js
+++ b/src/app/main.js
@@ -83,11 +83,17 @@ function setButtons(state) {
}
}
+ disablearray(document.querySelectorAll(".playBtnContainer .playBtn"))
disablearray(document.querySelectorAll("#nsMods .buttons.modbtns button"))
disablearray(document.querySelectorAll("#browser #browserEntries .text button"))
}
ipcRenderer.on("setbuttons", (event, state) => {setButtons(state)})
+ipcRenderer.on("gamepathlost", (event, state) => {
+ page(0);
+ setButtons(false);
+ alert(lang("gui.gamepath.lost"));
+})
// Frontend part of updating Northstar
ipcRenderer.on("ns-update-event", (event, key) => {