Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

middleware.ts 547B

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. });