aboutsummaryrefslogtreecommitdiff
path: root/src-vue
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-10-06 01:26:33 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-10-06 01:26:33 +0200
commit3172d051a475956f9ef9eff40016596025741018 (patch)
tree92507a92c393a9dfeac86ad23ea7a8e15a9b5431 /src-vue
parent6e68cc6678664cec7c090c0587c1e55b24df4fed (diff)
downloadFlightCore-3172d051a475956f9ef9eff40016596025741018.tar.gz
FlightCore-3172d051a475956f9ef9eff40016596025741018.zip
feat: Initial logic to disable all but core mods
In the future, this button should be moved to a "Repair" view. For now I'm putting it into Dev view for testing.
Diffstat (limited to 'src-vue')
-rw-r--r--src-vue/src/views/DeveloperView.vue33
1 files changed, 33 insertions, 0 deletions
diff --git a/src-vue/src/views/DeveloperView.vue b/src-vue/src/views/DeveloperView.vue
index ccf0e732..72a3f4d1 100644
--- a/src-vue/src/views/DeveloperView.vue
+++ b/src-vue/src/views/DeveloperView.vue
@@ -11,6 +11,13 @@
<el-button type="primary" @click="toggleReleaseCandidate">
Toggle Release Candidate
</el-button>
+
+ <h3>Repair:</h3>
+
+ <el-button type="primary" @click="disableAllModsButCore">
+ Disable all but core mods
+ </el-button>
+
</div>
</template>
@@ -19,6 +26,7 @@ import {defineComponent} from "vue";
import { invoke } from "@tauri-apps/api";
import { ElNotification } from "element-plus";
import { ReleaseCanal } from "../utils/ReleaseCanal";
+import { GameInstall } from "../utils/GameInstall";
export default defineComponent({
name: "DeveloperView",
@@ -53,6 +61,30 @@ export default defineComponent({
type: 'success',
position: 'bottom-right'
});
+ },
+ 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_caller", { gameInstall: game_install }).then((message) => {
+ console.log(message);
+ ElNotification({
+ title: 'Success',
+ message: "Disabled all mods but core",
+ type: 'success',
+ position: 'bottom-right'
+ });
+ })
+ .catch((error) => {
+ console.error(error);
+ ElNotification({
+ title: 'Error',
+ message: `${error}`,
+ type: 'error',
+ position: 'bottom-right'
+ });
+ });
}
}
});
@@ -61,5 +93,6 @@ export default defineComponent({
<style scoped>
.fc__developer__container {
padding: 20px 30px;
+ color: white;
}
</style>