aboutsummaryrefslogtreecommitdiff
path: root/src/reducers/content.js
blob: ce59b183dfecfe36781089d11ad8d612a2683fe3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import * as consoleFrames from '../console/frames';
import actions from '../actions';

export default function reducer(state, action = {}) {
  switch (action.type) {
  case actions.CMD_OPEN:
    return consoleFrames.showCommand('');
  case actions.CMD_TABS_OPEN:
    if (action.alter) {
      // alter url
      return consoleFrames.showCommand('open ' + window.location.href);
    } else {
      return consoleFrames.showCommand('open ');
    }
  case actions.CMD_BUFFER:
    return consoleFrames.showCommand('buffer ');
  }
}