diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2023-03-12 21:04:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-12 20:04:54 +0000 |
commit | fc3d4e20de945beb05e013daaff0689d5b74dab2 (patch) | |
tree | 138c079f91796b9178441d7e8fbf7f3aafc5a340 /src-vue/src/views/SettingsView.vue | |
parent | e04dcba35faaae09886d60f685ec13359a057890 (diff) | |
download | FlightCore-fc3d4e20de945beb05e013daaff0689d5b74dab2.tar.gz FlightCore-fc3d4e20de945beb05e013daaff0689d5b74dab2.zip |
feat: Move open repair window button to settings (#208)
This makes it now "publicly" available
Diffstat (limited to 'src-vue/src/views/SettingsView.vue')
-rw-r--r-- | src-vue/src/views/SettingsView.vue | 20 |
1 files changed, 19 insertions, 1 deletions
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; |