diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2022-11-11 12:08:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-11 12:08:34 +0100 |
commit | db569f94c2dc461ee17fcebd083a46aa20fb06f6 (patch) | |
tree | a3db381dcc1ee574177d1754dc7ac719d1b986fb /src-vue/src/views/SettingsView.vue | |
parent | c83d87103381706df262fdd07a78f4d50d86de39 (diff) | |
download | FlightCore-db569f94c2dc461ee17fcebd083a46aa20fb06f6.tar.gz FlightCore-db569f94c2dc461ee17fcebd083a46aa20fb06f6.zip |
refactor: Clicking FC version activates dev (#44)
instead of clicking Northstar version.
Makes dev mode a bit more "hidden" (i.e. less likely to be accidentally
opened by end-user) and it's more logical to click FlightCore version to
open **FlightCore** dev mode as opposed to clicking Northstar version.
Diffstat (limited to 'src-vue/src/views/SettingsView.vue')
-rw-r--r-- | src-vue/src/views/SettingsView.vue | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src-vue/src/views/SettingsView.vue b/src-vue/src/views/SettingsView.vue index 0b0e52e4..b32f7e6f 100644 --- a/src-vue/src/views/SettingsView.vue +++ b/src-vue/src/views/SettingsView.vue @@ -13,7 +13,9 @@ </template> </el-input> <h3>About:</h3> - FlightCore Version: {{ flightcoreVersion === '' ? 'Unknown version' : `${flightcoreVersion}` }} + <div class="fc_northstar__version" @click="activateDeveloperMode"> + FlightCore Version: {{ flightcoreVersion === '' ? 'Unknown version' : `${flightcoreVersion}` }} + </div> <br /> <br /> UI design inspired by <el-link :underline="false" target="_blank" href="https://github.com/TFORevive/tforevive_launcher/" type="primary">TFORevive Launcher</el-link> (not yet public) @@ -22,15 +24,34 @@ <script lang="ts"> import { defineComponent } from "vue"; +import { ElNotification } from 'element-plus'; export default defineComponent({ name: "SettingsView", + data() { + return { + developerModeClicks: 0 + } + }, computed: { flightcoreVersion(): string { return this.$store.state.flightcore_version; }, }, methods: { + activateDeveloperMode() { + this.developerModeClicks += 1; + if (this.developerModeClicks >= 6) { + this.$store.state.developer_mode = true; + ElNotification({ + title: 'Watch out!', + message: 'Developer mode enabled.', + type: 'info', + position: 'bottom-right' + }); + this.developerModeClicks = 0; + } + }, async updateGamePath() { this.$store.commit('updateGamePath'); } |