Skip to content

Commit

Permalink
chore: apply fixes from @precondition to pinia PR (#1373)
Browse files Browse the repository at this point in the history
* chore: apply fixes from @precondition to pinia PR

* chore: missed a trailing '.'
  • Loading branch information
yanfali authored Nov 9, 2024
1 parent 6add44d commit cf968a0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/store/keycodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ function toLocaleKeycode(keycodeLUT, keycodeObject) {
}

/**
* Used to dynamically generate the tab data for they keycode
* Used to dynamically generate the tab data for the keycode
* display. This UI is customized based on the OS keyboard layout
* selected.
*
* @param {string} osKeyboardLayout
* @param {boolean} isSteno
* @returns {Array.<KeycodeDefinition|KeycodeLabel|WidthPlaceholder}
* @returns {Array.<KeycodeDefinition|KeycodeLabel|WidthPlaceholder>}
*/
function generateKeycodes(osKeyboardLayout, isSteno = false) {
store.commit('app/setIso', !isANSI());
Expand Down Expand Up @@ -183,15 +183,15 @@ export const useKeycodesStore = defineStore('keycodes', {

/**
* @typedef {Object} WidthPlaceholder - used for spacing
* @property {number} width - width in Key Units * 1000. e.g. 1U = 1000, 2U = 2000.
* @property {number} width - width in Key Units * 1000. e.g. 1U = 1000, 2U = 2000
*/

/**
* @typedef {Object} KeycodeDefinition - metadata about a keycode
* @property {string} name - UI display label for the keycode
* @property {string} code - QMK keycode defintion
* @property {string} code - QMK keycode definition
* @property {string} [keys] - javascript keypress id. Used by keyboard handler
* @property {number} [width] - width in Key Units * 1000. e.g. 1U = 1000, 2U = 2000.
* @property {number} [width] - width in Key Units * 1000. e.g. 1U = 1000, 2U = 2000
* @property {'text'|'layer'|'container'|'layer-container'} [type]
* @property {number} [layer]
* @property {string} [title] - help text for hover
Expand All @@ -211,7 +211,7 @@ export const useKeycodesStore = defineStore('keycodes', {
/**
* @typedef {Object} KeycodeStoreState
* @property {Array.<KeycodeDefinition|KeycodeLabel|WidthPlaceholder>} keycodes - active keycodes
* @property {string} searchFilter - currently search filter
* @property {string} searchFilter - current query in keycode picker search filter
* @property {SearchCounters} searchCounters - count of matching keycodes per tab
* @property {boolean} steno - is steno tab active
* @property {'ANSI'|'ISO/JIS'|'AppMediaMouse'|'Quantum'|'Steno'|'KeyboardSettings'} active - active tab
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/app/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const actions = {
commit('setOSKeyboardLayout', osLayout);
const keycodesStore = useKeycodesStore();

// Important to call keycodes/updatekeycodeNames *before* keymap/updateKeycodeNames.
// Important to call keycodesStore.updatekeycodeNames *before* keymap/updateKeycodeNames.
keycodesStore.updateKeycodeNames();
this.commit('keymap/updateKeycodeNames');
keycodesStore.changeActive(
Expand Down

0 comments on commit cf968a0

Please sign in to comment.