blob: cf19e3e6701d13521ce9c2a60ce390d8e159b395 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
<template>
<div class="fc-container">
<el-scrollbar>
<el-alert title="Info" type="info" :closable="false" show-icon>
This window contains various functionality to repair common issues with Northstar and FlightCore.
</el-alert>
<h1>Repair</h1>
<h2>Northstar</h2>
<el-button type="primary" @click="disableAllModsButCore">
Disable all but core mods
</el-button>
</el-scrollbar>
</div>
</template>
<script lang="ts">
import { defineComponent } from "vue";
import { ElNotification } from "element-plus";
import { GameInstall } from "../utils/GameInstall";
import { invoke } from "@tauri-apps/api";
export default defineComponent({
name: "RepairView",
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 })
.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'
});
});
},
}
});
</script>
<style scoped>
.fc-container {
padding-top: 0px;
}
</style>
|