aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src/views/SettingsView.vue
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2023-05-08 16:53:36 +0200
committerGitHub <noreply@github.com>2023-05-08 16:53:36 +0200
commit89806f36e84530f642d0c630b6e53c8fe0139fc9 (patch)
tree90f2d7cb5e93f2b4b00d4e604e35b410951133de /src-vue/src/views/SettingsView.vue
parentbd22370bebeded34fa5f34e5c7feae2f1fa7ec7d (diff)
downloadFlightCore-89806f36e84530f642d0c630b6e53c8fe0139fc9.tar.gz
FlightCore-89806f36e84530f642d0c630b6e53c8fe0139fc9.zip
feat: Button to open game folder (#302)
* feat: Add button to open Titanfall2 folder * feat: Add English localisation * feat: Add German localisation * chore: Add placeholder French translation while waiting for translators * feat: add French localization * fix: Use append slot for button This way there input field has a consistent size --------- Co-authored-by: Remy Raes <contact@remyraes.com>
Diffstat (limited to 'src-vue/src/views/SettingsView.vue')
-rw-r--r--src-vue/src/views/SettingsView.vue10
1 files changed, 10 insertions, 0 deletions
diff --git a/src-vue/src/views/SettingsView.vue b/src-vue/src/views/SettingsView.vue
index 772a4c5c..a8c539e8 100644
--- a/src-vue/src/views/SettingsView.vue
+++ b/src-vue/src/views/SettingsView.vue
@@ -13,6 +13,11 @@
<template #prepend>
<el-button icon="Folder" @click="updateGamePath"/>
</template>
+ <template #append>
+ <el-button @click="openGameInstallFolder">
+ {{ $t('settings.open_game_folder') }}
+ </el-button>
+ </template>
</el-input>
</div>
@@ -78,6 +83,7 @@ import { Store } from 'tauri-plugin-store-api';
import { showErrorNotification, showNotification } from "../utils/ui";
import LanguageSelector from "../components/LanguageSelector.vue";
const persistentStore = new Store('flight-core-settings.json');
+import { open } from '@tauri-apps/api/shell';
export default defineComponent({
name: "SettingsView",
@@ -143,6 +149,10 @@ export default defineComponent({
showErrorNotification(error);
});
},
+ async openGameInstallFolder() {
+ // Opens the folder in default file explorer application
+ await open(`${this.$store.state.game_path}`);
+ }
},
mounted() {
document.querySelector('input')!.disabled = true;