Make userlist responsive

This commit is contained in:
Ken-Håvard Lieng 2016-01-11 23:31:06 +01:00
parent 937560e859
commit 67b83fa3d6
15 changed files with 115 additions and 51 deletions

View file

@ -8,8 +8,8 @@ import privateChats from './privateChats';
import search from './search';
import servers from './servers';
import settings from './settings';
import showMenu from './showMenu';
import tab from './tab';
import ui from './ui';
export default combineReducers({
routing: routeReducer,
@ -21,6 +21,6 @@ export default combineReducers({
search,
servers,
settings,
showMenu,
tab
tab,
ui
});

View file

@ -1,12 +0,0 @@
import createReducer from '../util/createReducer';
import * as actions from '../actions';
export default createReducer(false, {
[actions.TOGGLE_MENU](state) {
return !state;
},
[actions.HIDE_MENU]() {
return false;
}
});

View file

@ -0,0 +1,22 @@
import { Record } from 'immutable';
import createReducer from '../util/createReducer';
import * as actions from '../actions';
const State = Record({
showTabList: false,
showUserList: false
});
export default createReducer(new State(), {
[actions.TOGGLE_MENU](state) {
return state.update('showTabList', show => !show);
},
[actions.HIDE_MENU](state) {
return state.set('showTabList', false);
},
[actions.TOGGLE_USERLIST](state) {
return state.update('showUserList', show => !show);
}
});