aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src
diff options
context:
space:
mode:
authorRémy Raes <contact@remyraes.com>2022-10-06 15:31:54 +0200
committerGitHub <noreply@github.com>2022-10-06 15:31:54 +0200
commit99cd32803edc497443ca03e692589ed332b2e6b2 (patch)
tree1ec8839e7b46faaf8809afcb67db64e531a63cc2 /src-vue/src
parenta026b88a94f4dec5f0568b8371a93fbb7714c3c2 (diff)
parent0f1325f52a5eb254ec4af7d51802459f0605c972 (diff)
downloadFlightCore-99cd32803edc497443ca03e692589ed332b2e6b2.tar.gz
FlightCore-99cd32803edc497443ca03e692589ed332b2e6b2.zip
Merge pull request #6 from GeckoEidechse/feat/initial-extra-mods-disable-button
feat: Initial logic to disable all but core mods
Diffstat (limited to 'src-vue/src')
-rw-r--r--src-vue/src/views/DeveloperView.vue31
1 files changed, 31 insertions, 0 deletions
diff --git a/src-vue/src/views/DeveloperView.vue b/src-vue/src/views/DeveloperView.vue
index ccf0e732..f08908a6 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,28 @@ 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) => {
+ ElNotification({
+ title: 'Success',
+ message: "Disabled all mods but core",
+ type: 'success',
+ position: 'bottom-right'
+ });
+ })
+ .catch((error) => {
+ ElNotification({
+ title: 'Error',
+ message: error,
+ type: 'error',
+ position: 'bottom-right'
+ });
+ });
}
}
});
@@ -61,5 +91,6 @@ export default defineComponent({
<style scoped>
.fc__developer__container {
padding: 20px 30px;
+ color: white;
}
</style>