aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2023-03-12 21:04:54 +0100
committerGitHub <noreply@github.com>2023-03-12 20:04:54 +0000
commitfc3d4e20de945beb05e013daaff0689d5b74dab2 (patch)
tree138c079f91796b9178441d7e8fbf7f3aafc5a340
parente04dcba35faaae09886d60f685ec13359a057890 (diff)
downloadFlightCore-fc3d4e20de945beb05e013daaff0689d5b74dab2.tar.gz
FlightCore-fc3d4e20de945beb05e013daaff0689d5b74dab2.zip
feat: Move open repair window button to settings (#208)
This makes it now "publicly" available
-rw-r--r--src-vue/src/views/DeveloperView.vue16
-rw-r--r--src-vue/src/views/SettingsView.vue20
2 files changed, 19 insertions, 17 deletions
diff --git a/src-vue/src/views/DeveloperView.vue b/src-vue/src/views/DeveloperView.vue
index b8c8c242..52117b8d 100644
--- a/src-vue/src/views/DeveloperView.vue
+++ b/src-vue/src/views/DeveloperView.vue
@@ -37,9 +37,6 @@
<h3>Repair:</h3>
- <el-button type="primary" @click="createNewWindow">
- Open Repair window
- </el-button>
<el-button type="primary" @click="getInstalledMods">
Get installed mods
@@ -155,19 +152,6 @@ export default defineComponent({
});
});
},
-
- async createNewWindow() {
- await invoke("open_repair_window")
- .then((message) => { })
- .catch((error) => {
- ElNotification({
- title: 'Error',
- message: error,
- type: 'error',
- position: 'bottom-right'
- });
- });
- },
}
});
</script>
diff --git a/src-vue/src/views/SettingsView.vue b/src-vue/src/views/SettingsView.vue
index 1c03fe4f..c93d69ff 100644
--- a/src-vue/src/views/SettingsView.vue
+++ b/src-vue/src/views/SettingsView.vue
@@ -32,6 +32,11 @@
</el-input>
</div>
+ <h3>Repair</h3>
+ <el-button type="primary" @click="openRepairWindow">
+ Open Repair window
+ </el-button>
+
<h3>About:</h3>
<div class="fc_northstar__version" @click="activateDeveloperMode">
FlightCore Version: {{ flightcoreVersion === '' ? 'Unknown version' : `${flightcoreVersion}` }}
@@ -53,6 +58,7 @@
<script lang="ts">
import { defineComponent } from "vue";
import { ElNotification } from 'element-plus';
+import { invoke } from "@tauri-apps/api";
import { ReleaseCanal } from "../utils/ReleaseCanal";
import { Store } from 'tauri-plugin-store-api';
const persistentStore = new Store('flight-core-settings.json');
@@ -109,7 +115,19 @@ export default defineComponent({
},
async updateGamePath() {
this.$store.commit('updateGamePath');
- }
+ },
+ async openRepairWindow() {
+ await invoke("open_repair_window")
+ .then((message) => { })
+ .catch((error) => {
+ ElNotification({
+ title: 'Error',
+ message: error,
+ type: 'error',
+ position: 'bottom-right'
+ });
+ });
+ },
},
mounted() {
document.querySelector('input')!.disabled = true;