From 89806f36e84530f642d0c630b6e53c8fe0139fc9 Mon Sep 17 00:00:00 2001 From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> Date: Mon, 8 May 2023 16:53:36 +0200 Subject: 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 --- src-vue/src/i18n/lang/de.json | 1 + src-vue/src/i18n/lang/en.json | 1 + src-vue/src/i18n/lang/fr.json | 1 + src-vue/src/views/SettingsView.vue | 10 ++++++++++ 4 files changed, 13 insertions(+) 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 @@ + @@ -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; -- cgit v1.2.3