mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
* ref(keyboard-shortcuts) refactor keyboard shortcuts to use redux fix unsynced default value between config flag and local storage * code review * fix build
32 lines
936 B
TypeScript
32 lines
936 B
TypeScript
import { IReduxState } from '../app/types';
|
|
|
|
/**
|
|
* Returns whether or not the keyboard shortcuts are enabled.
|
|
*
|
|
* @param {Object} state - The redux state.
|
|
* @returns {boolean} - Whether or not the keyboard shortcuts are enabled.
|
|
*/
|
|
export function areKeyboardShortcutsEnabled(state: IReduxState) {
|
|
return state['features/keyboard-shortcuts'].enabled;
|
|
}
|
|
|
|
/**
|
|
* Returns the keyboard shortcuts map.
|
|
*
|
|
* @param {Object} state - The redux state.
|
|
* @returns {Map} - The keyboard shortcuts map.
|
|
*/
|
|
export function getKeyboardShortcuts(state: IReduxState) {
|
|
return state['features/keyboard-shortcuts'].shortcuts;
|
|
}
|
|
|
|
/**
|
|
* Returns the keyboard shortcuts help descriptions.
|
|
*
|
|
* @param {Object} state - The redux state.
|
|
* @returns {Map} - The keyboard shortcuts help descriptions.
|
|
*/
|
|
export function getKeyboardShortcutsHelpDescriptions(state: IReduxState) {
|
|
return state['features/keyboard-shortcuts'].shortcutsHelp;
|
|
}
|