diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2023-05-08 16:53:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-08 16:53:36 +0200 |
commit | 89806f36e84530f642d0c630b6e53c8fe0139fc9 (patch) | |
tree | 90f2d7cb5e93f2b4b00d4e604e35b410951133de | |
parent | bd22370bebeded34fa5f34e5c7feae2f1fa7ec7d (diff) | |
download | FlightCore-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>
-rw-r--r-- | src-vue/src/i18n/lang/de.json | 1 | ||||
-rw-r--r-- | src-vue/src/i18n/lang/en.json | 1 | ||||
-rw-r--r-- | src-vue/src/i18n/lang/fr.json | 1 | ||||
-rw-r--r-- | src-vue/src/views/SettingsView.vue | 10 |
4 files changed, 13 insertions, 0 deletions
diff --git a/src-vue/src/i18n/lang/de.json b/src-vue/src/i18n/lang/de.json index b3b6fd16..42811edf 100644 --- a/src-vue/src/i18n/lang/de.json +++ b/src-vue/src/i18n/lang/de.json @@ -83,6 +83,7 @@ "settings": { "manage_install": "Installation verwalten", "choose_folder": "Installationsordner wählen", + "open_game_folder": "Ordner öffnen", "nb_ts_mods_per_page": "Anzahl an Thunderstore Mods pro Seite", "nb_ts_mods_per_page_desc1": "Ändern dieser Einstellung kann die Leistung beim Suchen von Thunderstore Mods beeinflussen.", "nb_ts_mods_per_page_desc2": "Setze diesen Wert auf 0 um alle Mods auf einer einzelnen Seite anzuzeigen.", diff --git a/src-vue/src/i18n/lang/en.json b/src-vue/src/i18n/lang/en.json index 407b69d1..f5a92a94 100644 --- a/src-vue/src/i18n/lang/en.json +++ b/src-vue/src/i18n/lang/en.json @@ -93,6 +93,7 @@ "settings": { "manage_install": "Manage installation", "choose_folder": "Choose installation folder", + "open_game_folder": "Open Folder", "nb_ts_mods_per_page": "Number of Thunderstore mods per page", "nb_ts_mods_per_page_desc1": "This has an impact on display performances when browsing Thunderstore mods.", "nb_ts_mods_per_page_desc2": "Set this value to 0 to disable pagination.", diff --git a/src-vue/src/i18n/lang/fr.json b/src-vue/src/i18n/lang/fr.json index 3b224a69..0e54bfa7 100644 --- a/src-vue/src/i18n/lang/fr.json +++ b/src-vue/src/i18n/lang/fr.json @@ -83,6 +83,7 @@ "settings": { "manage_install": "Gérer l'installation", "choose_folder": "Choisir le dossier d'installation du jeu", + "open_game_folder": "Ouvrir le dossier du jeu", "nb_ts_mods_per_page": "Nombre de mods Thunderstore par page", "nb_ts_mods_per_page_desc1": "Ce paramètre a un impact sur les performances d'affichage des mods Thunderstore.", "nb_ts_mods_per_page_desc2": "Réglez-le sur 0 pour désactiver la pagination.", 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; |