diff options
author | Remy Raes <raes.remy@gmail.com> | 2022-09-24 18:20:45 +0200 |
---|---|---|
committer | Remy Raes <raes.remy@gmail.com> | 2022-09-24 18:20:45 +0200 |
commit | bdba63fa033a9f98d63951ec0cf9109f7949f444 (patch) | |
tree | 69720825fe06011e498e246a17f2c8e7328e0fb0 /src-vue/src/views | |
parent | 475fc7ceda3ff1fb28e54db96182fd921e1b11a5 (diff) | |
download | FlightCore-bdba63fa033a9f98d63951ec0cf9109f7949f444.tar.gz FlightCore-bdba63fa033a9f98d63951ec0cf9109f7949f444.zip |
feat: developer mode can be activated by clicking northstar version multiple times
Diffstat (limited to 'src-vue/src/views')
-rw-r--r-- | src-vue/src/views/PlayView.vue | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src-vue/src/views/PlayView.vue b/src-vue/src/views/PlayView.vue index 4104f0ac..a3a572e6 100644 --- a/src-vue/src/views/PlayView.vue +++ b/src-vue/src/views/PlayView.vue @@ -1,10 +1,35 @@ -<script setup lang="ts"> +<script lang="ts"> +import { ElNotification } from 'element-plus'; + +export default { + data() { + return { + developerModeClicks: 0 + } + }, + 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' + }); + } + } + } +}; </script> <template> <div class="fc_launch__container"> <div class="fc_title">Northstar</div> - <div class="fc_northstar__version">v{{ $store.state.installed_northstar_version }}</div> + <div class="fc_northstar__version" @click="activateDeveloperMode"> + v{{ $store.state.installed_northstar_version }} + </div> <el-button type="primary" size="large">Launch game</el-button> </div> </template> |