diff options
author | GeckoEidechse <gecko.eidechse+git@pm.me> | 2023-07-24 14:16:24 +0200 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2023-07-24 14:16:24 +0200 |
commit | 31ecd728ba2bb6244214423c951b40e308d16edf (patch) | |
tree | 81d167f87e16220e479b9e4effa57ba8ec7b4798 /src-vue/src/views | |
parent | c227cd0111298f6d341e7b00a27d36bd0a483a36 (diff) | |
parent | 399f0e78b4773aa97a8a80c43fb2312ea830a845 (diff) | |
download | FlightCore-31ecd728ba2bb6244214423c951b40e308d16edf.tar.gz FlightCore-31ecd728ba2bb6244214423c951b40e308d16edf.zip |
Merge branch 'main' into feat/launch-parameters
Diffstat (limited to 'src-vue/src/views')
-rw-r--r-- | src-vue/src/views/DeveloperView.vue | 22 | ||||
-rw-r--r-- | src-vue/src/views/RepairView.vue | 26 | ||||
-rw-r--r-- | src-vue/src/views/SettingsView.vue | 4 |
3 files changed, 10 insertions, 42 deletions
diff --git a/src-vue/src/views/DeveloperView.vue b/src-vue/src/views/DeveloperView.vue index c52c5bf9..188dc7a3 100644 --- a/src-vue/src/views/DeveloperView.vue +++ b/src-vue/src/views/DeveloperView.vue @@ -147,7 +147,6 @@ <script lang="ts"> import { defineComponent } from "vue"; import { invoke } from "@tauri-apps/api"; -import { GameInstall } from "../utils/GameInstall"; import { TagWrapper } from "../../../src-tauri/bindings/TagWrapper"; import { NorthstarThunderstoreReleaseWrapper } from "../../../src-tauri/bindings/NorthstarThunderstoreReleaseWrapper"; import PullRequestsSelector from "../components/PullRequestsSelector.vue"; @@ -232,11 +231,7 @@ export default defineComponent({ this.$store.commit('launchGameSteam', {no_checks: false, launch_args: this.launch_args}); }, async getInstalledMods() { - let game_install = { - game_path: this.$store.state.game_path, - install_type: this.$store.state.install_type - } as GameInstall; - await invoke("get_installed_mods_and_properties", { gameInstall: game_install }).then((message) => { + await invoke("get_installed_mods_and_properties", { gameInstall: this.$store.state.game_install }).then((message) => { // Simply console logging for now // In the future we should display the installed mods somewhere console.log(message); @@ -249,12 +244,8 @@ export default defineComponent({ }); }, async installMod() { - let game_install = { - game_path: this.$store.state.game_path, - install_type: this.$store.state.install_type - } as GameInstall; let mod_to_install = this.mod_to_install_field_string; - await invoke<string>("install_mod_caller", { gameInstall: game_install, thunderstoreModString: mod_to_install }).then((message) => { + await invoke<string>("install_mod_caller", { gameInstall: this.$store.state.game_install, thunderstoreModString: mod_to_install }).then((message) => { // Show user notification if mod install completed. showNotification(`Installed ${mod_to_install}`, message); }) @@ -289,7 +280,7 @@ export default defineComponent({ const notification = showNotification(`Installing git main`, 'Please wait', 'info', 0); - await invoke<string>("install_git_main", { gameInstallPath: this.$store.state.game_path }) + await invoke<string>("install_git_main", { gameInstallPath: this.$store.state.game_install.game_path }) .then((message) => { this.release_notes_text = message; showNotification("Done", `Installed launcher build from ${message}`); @@ -313,11 +304,6 @@ export default defineComponent({ }); }, async installNorthstarVersion() { - let game_install = { - game_path: this.$store.state.game_path, - install_type: this.$store.state.install_type - } as GameInstall; - // Send notification telling the user to wait for the process to finish const notification = showNotification( `Installing Northstar version v${this.selected_ns_version.value.version}`, @@ -326,7 +312,7 @@ export default defineComponent({ 0 ); - let install_northstar_result = invoke("install_northstar_caller", { gamePath: game_install.game_path, northstarPackageName: this.selected_ns_version.value.package, versionNumber: this.selected_ns_version.value.version }); + let install_northstar_result = invoke("install_northstar_caller", { gamePath: this.$store.state.game_install.game_path, northstarPackageName: this.selected_ns_version.value.package, versionNumber: this.selected_ns_version.value.version }); await install_northstar_result .then((message) => { diff --git a/src-vue/src/views/RepairView.vue b/src-vue/src/views/RepairView.vue index e284e824..614c1e56 100644 --- a/src-vue/src/views/RepairView.vue +++ b/src-vue/src/views/RepairView.vue @@ -54,11 +54,7 @@ export default defineComponent({ }, methods: { async disableAllModsButCore() { - let game_install = { - game_path: this.$store.state.game_path, - install_type: this.$store.state.install_type - } as GameInstall; - await invoke("disable_all_but_core", { gameInstall: game_install }) + await invoke("disable_all_but_core", { gameInstall: this.$store.state.game_install }) .then((message) => { showNotification(this.$t('generic.success'), this.$t('settings.repair.window.disable_all_but_core_success')); }) @@ -67,11 +63,6 @@ export default defineComponent({ }); }, async forceInstallNorthstar() { - let game_install = { - game_path: this.$store.state.game_path, - install_type: this.$store.state.install_type - } as GameInstall; - // Send notification telling the user to wait for the process to finish const notification = showNotification( this.$t('settings.repair.window.reinstall_title'), @@ -80,7 +71,7 @@ export default defineComponent({ 0 ); - let install_northstar_result = invoke("install_northstar_caller", { gamePath: game_install.game_path, northstarPackageName: ReleaseCanal.RELEASE }); + let install_northstar_result = invoke("install_northstar_caller", { gamePath: this.$store.state.game_install.game_path, northstarPackageName: ReleaseCanal.RELEASE }); appWindow.listen<InstallProgress>( 'northstar-install-download-progress', @@ -107,11 +98,7 @@ export default defineComponent({ }); }, async cleanUpDownloadFolder() { - let game_install = { - game_path: this.$store.state.game_path, - install_type: this.$store.state.install_type - } as GameInstall; - await invoke("clean_up_download_folder_caller", { gameInstall: game_install, force: true }).then((message) => { + await invoke("clean_up_download_folder_caller", { gameInstall: this.$store.state.game_install, force: true }).then((message) => { // Show user notification if task completed. showNotification(this.$t('generic.done'), this.$t('generic.done')); }) @@ -126,12 +113,7 @@ export default defineComponent({ await persistentStore.save(); }, async disableModsettingsMod() { - let game_install = { - game_path: this.$store.state.game_path, - install_type: this.$store.state.install_type - } as GameInstall; - - await invoke("set_mod_enabled_status", { gameInstall: game_install, modName: "Mod Settings", isEnabled: false }) + await invoke("set_mod_enabled_status", { gameInstall: this.$store.state.game_install, modName: "Mod Settings", isEnabled: false }) .then((message) => { showNotification(this.$t('generic.success'), this.$t('settings.repair.window.disable_modsettings_success')); }) diff --git a/src-vue/src/views/SettingsView.vue b/src-vue/src/views/SettingsView.vue index c4e94c80..dcc787ae 100644 --- a/src-vue/src/views/SettingsView.vue +++ b/src-vue/src/views/SettingsView.vue @@ -6,7 +6,7 @@ <div class="fc_parameter__panel"> <h3>{{ $t('settings.manage_install') }}</h3> <el-input - v-model="$store.state.game_path" + v-model="$store.state.game_install.game_path" :placeholder="$t('settings.choose_folder')" @click="updateGamePath" > @@ -171,7 +171,7 @@ export default defineComponent({ }, async openGameInstallFolder() { // Opens the folder in default file explorer application - await open(`${this.$store.state.game_path}`); + await open(`${this.$store.state.game_install.game_path}`); } }, mounted() { |