You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021
  1. import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
  2. import { OPEN_KEYBOARD_SHORTCUTS_DIALOG } from './actionTypes';
  3. /**
  4. * Implements the middleware of the feature keyboard-shortcuts.
  5. *
  6. * @param {Store} store - The redux store.
  7. * @returns {Function}
  8. */
  9. MiddlewareRegistry.register(_store => next => action => {
  10. switch (action.type) {
  11. case OPEN_KEYBOARD_SHORTCUTS_DIALOG:
  12. if (typeof APP === 'object') {
  13. APP.keyboardshortcut.openDialog();
  14. }
  15. break;
  16. }
  17. return next(action);
  18. });