From db4e127f44b44210efb6a7d89cdb0e9e6be25d50 Mon Sep 17 00:00:00 2001 From: precondition <57645186+precondition@users.noreply.github.com> Date: Sun, 29 Oct 2023 01:43:01 +0200 Subject: [PATCH] Remove unused ISO toggle code (#1317) * Remove obsolete ISO toggle code from settings panel * Restore the call to keycodes/changeActive --- src/components/Keycodes.vue | 3 --- src/components/SettingsPanel.vue | 9 +-------- src/store/modules/app/actions.js | 12 ------------ 3 files changed, 1 insertion(+), 23 deletions(-) diff --git a/src/components/Keycodes.vue b/src/components/Keycodes.vue index 93c64800c0..07e28e083a 100644 --- a/src/components/Keycodes.vue +++ b/src/components/Keycodes.vue @@ -81,9 +81,6 @@ export default { ...mapGetters('keycodes', ['keycodes']), ...mapState('app', ['configuratorSettings']), ...mapState('keycodes', ['searchFilter', 'searchCounters', 'active']), - defaultTab() { - return this.configuratorSettings.iso ? 'ISO/JIS' : 'ANSI'; - }, activeTab() { return this.keycodesByGroup[this.active]; }, diff --git a/src/components/SettingsPanel.vue b/src/components/SettingsPanel.vue index cb206a6950..720c99a1a3 100644 --- a/src/components/SettingsPanel.vue +++ b/src/components/SettingsPanel.vue @@ -222,8 +222,7 @@ export default { 'toggleDarkMode', 'changeLanguage', 'changeOSKeyboardLayout', - 'toggleClearLayerDefault', - 'toggleIso' + 'toggleClearLayerDefault' ]), darkMode() { this.toggleDarkMode(); @@ -231,9 +230,6 @@ export default { clearLayerDefault() { this.toggleClearLayerDefault(); }, - iso() { - this.toggleIso(); - }, help(key) { switch (key) { case 'fastInput': @@ -254,9 +250,6 @@ export default { case 'osKeyboardLayout': this.helpText = this.$t('settingsPanel.osKeyboardLayout.help'); break; - case 'iso': - this.helpText = this.$t('settingsPanel.iso.help'); - break; case 'clearLayer': this.helpText = this.$t('settingsPanel.clearLayer.help'); break; diff --git a/src/store/modules/app/actions.js b/src/store/modules/app/actions.js index 6aef5146de..1903f4a936 100644 --- a/src/store/modules/app/actions.js +++ b/src/store/modules/app/actions.js @@ -166,17 +166,6 @@ const actions = { commit('setDarkmode', darkStatus); await dispatch('saveConfiguratorSettings'); }, - async toggleIso({ commit, state, dispatch }, init) { - let iso = state.configuratorSettings.iso; - if (!init) { - iso = !iso; - } - commit('setIso', iso); - this.commit('keymap/updateKeycodeNames'); - this.commit('tester/setLayout', iso ? 'ISO' : 'ANSI'); - await this.dispatch('tester/init'); - await dispatch('saveConfiguratorSettings'); - }, async toggleClearLayerDefault({ commit, state, dispatch }) { let status = state.configuratorSettings.clearLayerDefault; status = !status; @@ -196,7 +185,6 @@ const actions = { await dispatch('fetchKeyboards'); await dispatch('loadFavoriteKeyboard'); await dispatch('toggleDarkMode', true); - await dispatch('toggleIso', true); await dispatch('loadLanguage'); console.log('loadApplicationState End'); commit('setAppInitialized', true);