diff options
Diffstat (limited to 'src-vue/src/views')
-rw-r--r-- | src-vue/src/views/DeveloperView.vue | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src-vue/src/views/DeveloperView.vue b/src-vue/src/views/DeveloperView.vue index 92364679..80390432 100644 --- a/src-vue/src/views/DeveloperView.vue +++ b/src-vue/src/views/DeveloperView.vue @@ -31,6 +31,8 @@ import { invoke } from "@tauri-apps/api"; import { ElNotification } from "element-plus"; import { ReleaseCanal } from "../utils/ReleaseCanal"; import { GameInstall } from "../utils/GameInstall"; +import { Store } from 'tauri-plugin-store-api'; +const persistentStore = new Store('flight-core-settings.json'); export default defineComponent({ name: "DeveloperView", @@ -67,10 +69,13 @@ export default defineComponent({ }, async toggleReleaseCandidate() { // Flip between RELEASE and RELEASE_CANDIDATE - this.$store.state.release_canal = this.$store.state.release_canal === ReleaseCanal.RELEASE + this.$store.state.northstar_release_canal = this.$store.state.northstar_release_canal === ReleaseCanal.RELEASE ? ReleaseCanal.RELEASE_CANDIDATE : ReleaseCanal.RELEASE; + // Save change in persistent store + await persistentStore.set('northstar-release-canal', { value: this.$store.state.northstar_release_canal }); + // Update current state so that update check etc can be performed this.$store.commit("checkNorthstarUpdates"); @@ -78,8 +83,8 @@ export default defineComponent({ // Display notification to highlight change ElNotification({ - title: `${this.$store.state.release_canal}`, - message: `Switched release channel to: "${this.$store.state.release_canal}"`, + title: `${this.$store.state.northstar_release_canal}`, + message: `Switched release channel to: "${this.$store.state.northstar_release_canal}"`, type: 'success', position: 'bottom-right' }); |