Add manifest.json, icons and install button, flatten client/src
This commit is contained in:
parent
a219e689c1
commit
474afda9c2
105 changed files with 338 additions and 283 deletions
|
@ -1,59 +0,0 @@
|
|||
import createReducer from 'utils/createReducer';
|
||||
import * as actions from './actions';
|
||||
|
||||
export const getApp = state => state.app;
|
||||
export const getConnected = state => state.app.connected;
|
||||
export const getWrapWidth = state => state.app.wrapWidth;
|
||||
export const getCharWidth = state => state.app.charWidth;
|
||||
export const getWindowWidth = state => state.app.windowWidth;
|
||||
export const getConnectDefaults = state => state.app.connectDefaults;
|
||||
|
||||
const initialState = {
|
||||
connected: true,
|
||||
wrapWidth: 0,
|
||||
charWidth: 0,
|
||||
windowWidth: 0,
|
||||
connectDefaults: {
|
||||
name: '',
|
||||
address: '',
|
||||
channels: [],
|
||||
ssl: false,
|
||||
password: false,
|
||||
readonly: false,
|
||||
showDetails: false
|
||||
},
|
||||
hexIP: false,
|
||||
newVersionAvailable: false
|
||||
};
|
||||
|
||||
export default createReducer(initialState, {
|
||||
[actions.APP_SET](state, { key, value }) {
|
||||
state[key] = value;
|
||||
},
|
||||
|
||||
[actions.UPDATE_MESSAGE_HEIGHT](state, action) {
|
||||
state.wrapWidth = action.wrapWidth;
|
||||
state.charWidth = action.charWidth;
|
||||
state.windowWidth = action.windowWidth;
|
||||
}
|
||||
});
|
||||
|
||||
export function appSet(key, value) {
|
||||
return {
|
||||
type: actions.APP_SET,
|
||||
key,
|
||||
value
|
||||
};
|
||||
}
|
||||
|
||||
export function setConnected(connected) {
|
||||
return appSet('connected', connected);
|
||||
}
|
||||
|
||||
export function setCharWidth(width) {
|
||||
return appSet('charWidth', width);
|
||||
}
|
||||
|
||||
export function setConnectDefaults(defaults) {
|
||||
return appSet('connectDefaults', defaults);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue