Use MessagePack on disk
This commit is contained in:
parent
1def24500a
commit
76f99c8332
55 changed files with 11993 additions and 85 deletions
|
@ -1,5 +1,5 @@
|
|||
import { Record, List } from 'immutable';
|
||||
import { UPDATE_PATH } from 'redux-simple-router';
|
||||
import { UPDATE_LOCATION } from 'redux-simple-router';
|
||||
import createReducer from '../util/createReducer';
|
||||
import * as actions from '../actions';
|
||||
|
||||
|
@ -38,8 +38,8 @@ export default createReducer(new State(), {
|
|||
return state.set('history', state.history.filter(tab => tab.server !== action.server));
|
||||
},
|
||||
|
||||
[UPDATE_PATH](state, action) {
|
||||
if (action.payload.path.indexOf('.') === -1 && state.selected.server) {
|
||||
[UPDATE_LOCATION](state, action) {
|
||||
if (action.location.pathname.indexOf('.') === -1 && state.selected.server) {
|
||||
return state.set('selected', new Tab());
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { padLeft } from 'lodash';
|
||||
import padStart from 'lodash/padStart';
|
||||
|
||||
export wrapMessages from './wrapMessages';
|
||||
|
||||
|
@ -11,8 +11,8 @@ export function normalizeChannel(channel) {
|
|||
}
|
||||
|
||||
export function timestamp(date = new Date()) {
|
||||
const h = padLeft(date.getHours(), 2, '0');
|
||||
const m = padLeft(date.getMinutes(), 2, '0');
|
||||
const h = padStart(date.getHours(), 2, '0');
|
||||
const m = padStart(date.getMinutes(), 2, '0');
|
||||
return h + ':' + m;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue