+ client: login page
This commit is contained in:
@@ -79,8 +79,8 @@ const dashboard = handleActions(
|
||||
dnsVersion: version,
|
||||
dnsPort,
|
||||
dnsAddresses,
|
||||
upstreamDns: upstreamDns.join('\n'),
|
||||
bootstrapDns: bootstrapDns.join('\n'),
|
||||
upstreamDns: (upstreamDns && upstreamDns.join('\n')) || '',
|
||||
bootstrapDns: (bootstrapDns && bootstrapDns.join('\n')) || '',
|
||||
allServers,
|
||||
protectionEnabled,
|
||||
language,
|
||||
|
||||
24
client/src/reducers/login.js
Normal file
24
client/src/reducers/login.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import { combineReducers } from 'redux';
|
||||
import { handleActions } from 'redux-actions';
|
||||
import { reducer as formReducer } from 'redux-form';
|
||||
|
||||
import * as actions from '../actions/login';
|
||||
import toasts from './toasts';
|
||||
|
||||
const login = handleActions({
|
||||
[actions.processLoginRequest]: state => ({ ...state, processingLogin: true }),
|
||||
[actions.processLoginFailure]: state => ({ ...state, processingLogin: false }),
|
||||
[actions.processLoginSuccess]: (state, { payload }) => ({
|
||||
...state, ...payload, processingLogin: false,
|
||||
}),
|
||||
}, {
|
||||
processingLogin: false,
|
||||
email: '',
|
||||
password: '',
|
||||
});
|
||||
|
||||
export default combineReducers({
|
||||
login,
|
||||
toasts,
|
||||
form: formReducer,
|
||||
});
|
||||
Reference in New Issue
Block a user