diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/app/index.html | 1 | ||||
-rw-r--r-- | src/app/main.js | 9 | ||||
-rw-r--r-- | src/lang/en.json | 2 |
3 files changed, 12 insertions, 0 deletions
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." } }, |