Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

reducer.js 922B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // @flow
  2. import { ReducerRegistry } from '../base/redux';
  3. import { SET_DOCUMENT_EDITING_STATUS, SET_DOCUMENT_URL } from './actionTypes';
  4. const DEFAULT_STATE = {
  5. /**
  6. * URL for the shared document.
  7. */
  8. documentUrl: undefined,
  9. /**
  10. * Whether or not Etherpad is currently open.
  11. *
  12. * @public
  13. * @type {boolean}
  14. */
  15. editing: false
  16. };
  17. /**
  18. * Reduces the Redux actions of the feature features/etherpad.
  19. */
  20. ReducerRegistry.register(
  21. 'features/etherpad',
  22. (state = DEFAULT_STATE, action) => {
  23. switch (action.type) {
  24. case SET_DOCUMENT_EDITING_STATUS:
  25. return {
  26. ...state,
  27. editing: action.editing
  28. };
  29. case SET_DOCUMENT_URL:
  30. return {
  31. ...state,
  32. documentUrl: action.documentUrl
  33. };
  34. default:
  35. return state;
  36. }
  37. });