Skip to content
Snippets Groups Projects
Select Git revision
  • 8c36fa90a893ae0b9df1fb5ba75f5eb95a3ac8fb
  • master default protected
  • 133-fail2ban-page
  • reorganisation
  • 16-maintenace-service
  • 11-fail2ban
  • 6-monit-update
  • 7-dolibarr-fail2ban
  • 6-surveillance-interne-des-serveur
  • test-glpi
  • 2-migrate-to-phpfpm
  • jessie
  • github
13 results

installNextcloud.sh

Blame
  • viewers.js 898 B
    import { setIn } from 'immutable';
    import ActionTypes from '../actions/action-types';
    
    /**
     * viewersReducer
     */
    export const viewersReducer = (state = {}, action) => {
      switch (action.type) {
        case ActionTypes.UPDATE_VIEWPORT:
          return {
            ...state,
            [action.windowId]: {
              ...action.payload,
            },
          };
        case ActionTypes.REMOVE_WINDOW:
          return Object.keys(state).reduce((object, key) => {
            if (key !== action.windowId) {
              object[key] = state[key]; // eslint-disable-line no-param-reassign
            }
            return object;
          }, {});
        case ActionTypes.SET_WINDOW_VIEW_TYPE:
          return setIn(state, [action.windowId], null);
        case ActionTypes.SET_CANVAS:
          return setIn(state, [action.windowId], null);
        case ActionTypes.IMPORT_MIRADOR_STATE:
          return action.state.viewers;
        default:
          return state;
      }
    };