From a930c0342a584b4e74566a354876585b02635bed Mon Sep 17 00:00:00 2001 From: Alystrasz Date: Mon, 26 Sep 2022 18:59:23 +0200 Subject: developer mode can be turned off from developer view --- src-vue/src/plugins/store.ts | 5 +++++ src-vue/src/views/PlayView.vue | 1 + 2 files changed, 6 insertions(+) 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; } }, -- cgit v1.2.3