aboutsummaryrefslogtreecommitdiff
path: root/src-vue
diff options
context:
space:
mode:
authorAlystrasz <contact@remyraes.com>2022-09-26 18:59:23 +0200
committerAlystrasz <contact@remyraes.com>2022-09-26 18:59:23 +0200
commita930c0342a584b4e74566a354876585b02635bed (patch)
treed49c8849685954b839515b0df9abb57e85871b53 /src-vue
parent7ebd5bbbdb4ce004e7d67ce33fb08957b89d1b53 (diff)
downloadFlightCore-a930c0342a584b4e74566a354876585b02635bed.tar.gz
FlightCore-a930c0342a584b4e74566a354876585b02635bed.zip
developer mode can be turned off from developer view
Diffstat (limited to 'src-vue')
-rw-r--r--src-vue/src/plugins/store.ts5
-rw-r--r--src-vue/src/views/PlayView.vue1
2 files changed, 6 insertions, 0 deletions
diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts
index 4bb48f66..2d4b5684 100644
--- a/src-vue/src/plugins/store.ts
+++ b/src-vue/src/plugins/store.ts
@@ -21,6 +21,11 @@ export const store = createStore({
mutations: {
toggleDeveloperMode(state) {
state.developer_mode = !state.developer_mode;
+
+ // Reset tab when closing dev mode.
+ if (!state.developer_mode) {
+ store.commit('updateCurrentTab', Tabs.PLAY);
+ }
},
initialize(state) {
_initializeApp(state);
diff --git a/src-vue/src/views/PlayView.vue b/src-vue/src/views/PlayView.vue
index 2ac21ba4..d6633f53 100644
--- a/src-vue/src/views/PlayView.vue
+++ b/src-vue/src/views/PlayView.vue
@@ -24,6 +24,7 @@ export default {
type: 'info',
position: 'bottom-right'
});
+ this.developerModeClicks = 0;
}
},