Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: apply fixes from @precondition to pinia PR #1373

Merged
merged 2 commits into from
Nov 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading