logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

pleroma.js (527B)


  1. import { Map as ImmutableMap } from 'immutable';
  2. import { PANEL_FETCH_SUCCESS, PLEROMA_CONFIG_FETCH_SUCCESS } from '../actions/pleroma';
  3. const initialPanel = ImmutableMap({
  4. enabled: false,
  5. panel: ''
  6. });
  7. export function custom_panel(state = initialPanel, action) {
  8. switch (action.type) {
  9. case PANEL_FETCH_SUCCESS:
  10. return state.set('panel', action.panel); break;
  11. case PLEROMA_CONFIG_FETCH_SUCCESS:
  12. return state.set('enabled', (action.config || {}).showInstanceSpecificPanel || false);
  13. }
  14. return state;
  15. };