From bdba63fa033a9f98d63951ec0cf9109f7949f444 Mon Sep 17 00:00:00 2001
From: Remy Raes <raes.remy@gmail.com>
Date: Sat, 24 Sep 2022 18:20:45 +0200
Subject: feat: developer mode can be activated by clicking northstar version
 multiple times

---
 src-vue/src/views/PlayView.vue | 29 +++++++++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)

(limited to 'src-vue/src/views/PlayView.vue')

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>
-- 
cgit v1.2.3

