aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/app/css/toasts.css1
-rw-r--r--src/app/index.html1
-rw-r--r--src/app/main.js9
-rw-r--r--src/lang/en.json2
4 files changed, 13 insertions, 0 deletions
diff --git a/src/app/css/toasts.css b/src/app/css/toasts.css
index 65e325f..9b92383 100644
--- a/src/app/css/toasts.css
+++ b/src/app/css/toasts.css
@@ -54,4 +54,5 @@
opacity: 0.8;
font-size: 0.8em;
font-weight: 600;
+ word-break: break-word;
}
diff --git a/src/app/index.html b/src/app/index.html
index b18db42..4bd4d92 100644
--- a/src/app/index.html
+++ b/src/app/index.html
@@ -162,6 +162,7 @@
<div class="actions">
<button onclick="relaunch()">%%gui.settings.miscbuttons.buttons.restart_viper%%</button>
<button onclick="reset_config()">%%gui.settings.miscbuttons.buttons.reset_config%%</button>
+ <button onclick="open_gamepath()">%%gui.settings.miscbuttons.buttons.open_gamepath%%</button>
<button onclick="kill_game()">%%gui.settings.miscbuttons.buttons.force_quit_game%%</button>
<button onclick="kill_origin()">%%gui.settings.miscbuttons.buttons.force_quit_origin%%</button>
<button onclick="setpath()" class="disable-when-installing">%%gui.settings.miscbuttons.buttons.change_gamepath%%</button>
diff --git a/src/app/main.js b/src/app/main.js
index d94d508..8ccdce3 100644
--- a/src/app/main.js
+++ b/src/app/main.js
@@ -130,6 +130,15 @@ function reset_config() {
ipcRenderer.send("reset-config");
}
+function open_gamepath() {
+ let open_path = require("electron").shell.openPath;
+ if (settings.gamepath) {
+ open_path(settings.gamepath);
+ } else {
+ alert(lang("gui.settings.miscbuttons.open_gamepath_alert"));
+ }
+}
+
function relaunch() {
ipcRenderer.send("relaunch");
}
diff --git a/src/lang/en.json b/src/lang/en.json
index 5cb443e..bcfb372 100644
--- a/src/lang/en.json
+++ b/src/lang/en.json
@@ -188,6 +188,7 @@
"title": "Misc repair actions",
"desc": "If you're having problems then some of these buttons may help fixing it",
"buttons": {
+ "open_gamepath": "Open gamepath",
"reset_config": "Reset config file",
"restart_viper": "Restart Viper",
"change_gamepath": "Change gamepath",
@@ -195,6 +196,7 @@
"force_quit_origin": "Force quit Origin and or EA Desktop"
},
+ "open_gamepath_alert": "No valid gamepath is selected, so there's no gamepath to open, please select a valid gamepath first!",
"reset_config_alert": "Please confirm that you want to reset the config file, after confirming Viper will delete the config file, and then restart."
}
},