Update client dependencies
This commit is contained in:
parent
dbe9d03352
commit
7108fa572c
19 changed files with 109 additions and 116 deletions
|
@ -12,9 +12,9 @@ function updateRenderName(user) {
|
|||
let name = user.nick;
|
||||
|
||||
if (user.mode.indexOf('o') !== -1) {
|
||||
name = '@' + name;
|
||||
name = `@${name}`;
|
||||
} else if (user.mode.indexOf('v') !== -1) {
|
||||
name = '+' + name;
|
||||
name = `+${name}`;
|
||||
}
|
||||
|
||||
return user.set('renderName', name);
|
||||
|
@ -79,9 +79,9 @@ export default createReducer(Map(), {
|
|||
|
||||
[actions.SOCKET_JOIN](state, action) {
|
||||
const { server, channels, user } = action;
|
||||
return state.updateIn([server, channels[0], 'users'], List(), users => {
|
||||
return users.push(createUser(user)).sort(compareUsers);
|
||||
});
|
||||
return state.updateIn([server, channels[0], 'users'], List(), users =>
|
||||
users.push(createUser(user)).sort(compareUsers)
|
||||
);
|
||||
},
|
||||
|
||||
[actions.SOCKET_PART](state, action) {
|
||||
|
@ -110,9 +110,9 @@ export default createReducer(Map(), {
|
|||
channels.forEach(channel => {
|
||||
s.updateIn([server, channel, 'users'], users => {
|
||||
const i = users.findIndex(user => user.nick === action.old);
|
||||
return users.update(i, user => {
|
||||
return updateRenderName(user.set('nick', action.new));
|
||||
}).sort(compareUsers);
|
||||
return users.update(i, user =>
|
||||
updateRenderName(user.set('nick', action.new))
|
||||
).sort(compareUsers);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { combineReducers } from 'redux';
|
||||
import { routeReducer } from 'redux-simple-router';
|
||||
import { routeReducer } from 'react-router-redux';
|
||||
import channels from './channels';
|
||||
import environment from './environment';
|
||||
import input from './input';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Record, List } from 'immutable';
|
||||
import { UPDATE_LOCATION } from 'redux-simple-router';
|
||||
import { UPDATE_LOCATION } from 'react-router-redux';
|
||||
import createReducer from '../util/createReducer';
|
||||
import * as actions from '../actions';
|
||||
|
||||
|
@ -39,7 +39,7 @@ export default createReducer(new State(), {
|
|||
},
|
||||
|
||||
[UPDATE_LOCATION](state, action) {
|
||||
if (action.location.pathname.indexOf('.') === -1 && state.selected.server) {
|
||||
if (action.payload.pathname.indexOf('.') === -1 && state.selected.server) {
|
||||
return state.set('selected', new Tab());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue