Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add button to disable ModSettings mod #393

Merged
merged 1 commit into from
Jul 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src-vue/src/i18n/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
18 changes: 18 additions & 0 deletions src-vue/src/views/RepairView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
{{ $t('settings.repair.window.force_reinstall_ns') }}
</el-button>

<el-button type="primary" @click="disableModsettingsMod">
{{ $t('settings.repair.window.disable_modsettings') }}
</el-button>

<h2>FlightCore</h2>

<el-button type="primary" @click="cleanUpDownloadFolder">
Expand Down Expand Up @@ -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
Expand Down