From b8b715fbebfd8c3d4278a3359fbed1a52da4780f Mon Sep 17 00:00:00 2001 From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> Date: Sun, 2 Jul 2023 17:01:05 +0200 Subject: feat: Add button to disable ModSettings mod (#393) In preparation for Northstar releasing merged Mod Settings mod --- src-vue/src/i18n/lang/en.json | 2 ++ src-vue/src/views/RepairView.vue | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/src-vue/src/i18n/lang/en.json b/src-vue/src/i18n/lang/en.json index 202d7bdd..470e98be 100644 --- a/src-vue/src/i18n/lang/en.json +++ b/src-vue/src/i18n/lang/en.json @@ -119,6 +119,8 @@ "warning": "This window contains various functionality to repair common issues with Northstar and FlightCore.", "disable_all_but_core": "Disable all but core mods", "disable_all_but_core_success": "Disabled all mods but core", + "disable_modsettings": "Disable ModSettings mod", + "disable_modsettings_success": "Disabled ModSettings mod", "force_reinstall_ns": "Force reinstall Northstar", "force_delete_temp_dl": "Force delete temp download folder", "delete_persistent_store": "Delete FlightCore persistent store", diff --git a/src-vue/src/views/RepairView.vue b/src-vue/src/views/RepairView.vue index 9b3543d4..e284e824 100644 --- a/src-vue/src/views/RepairView.vue +++ b/src-vue/src/views/RepairView.vue @@ -17,6 +17,10 @@ {{ $t('settings.repair.window.force_reinstall_ns') }} + + {{ $t('settings.repair.window.disable_modsettings') }} + +

FlightCore

@@ -121,6 +125,20 @@ export default defineComponent({ // ...and save 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 }) + .then((message) => { + showNotification(this.$t('generic.success'), this.$t('settings.repair.window.disable_modsettings_success')); + }) + .catch((error) => { + showErrorNotification(error); + }); + }, }, watch: { // Lang value is propagated to repair view after it's mounted, so we need to watch -- cgit v1.2.3