Skip to content

Commit

Permalink
Remove unused ISO toggle code (#1317)
Browse files Browse the repository at this point in the history
* Remove obsolete ISO toggle code from settings panel

* Restore the call to keycodes/changeActive
  • Loading branch information
precondition authored Oct 28, 2023
1 parent b10afe3 commit db4e127
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 23 deletions.
3 changes: 0 additions & 3 deletions src/components/Keycodes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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];
},
Expand Down
9 changes: 1 addition & 8 deletions src/components/SettingsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -222,18 +222,14 @@ export default {
'toggleDarkMode',
'changeLanguage',
'changeOSKeyboardLayout',
'toggleClearLayerDefault',
'toggleIso'
'toggleClearLayerDefault'
]),
darkMode() {
this.toggleDarkMode();
},
clearLayerDefault() {
this.toggleClearLayerDefault();
},
iso() {
this.toggleIso();
},
help(key) {
switch (key) {
case 'fastInput':
Expand All @@ -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;
Expand Down
12 changes: 0 additions & 12 deletions src/store/modules/app/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit db4e127

Please sign in to comment.