Make userlist responsive
This commit is contained in:
parent
937560e859
commit
67b83fa3d6
15 changed files with 115 additions and 51 deletions
|
@ -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
|
||||
});
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
});
|
22
client/src/js/reducers/ui.js
Normal file
22
client/src/js/reducers/ui.js
Normal 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);
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue