+ client: handle update
This commit is contained in:
committed by
Simon Zolin
parent
068072bc5a
commit
cb3f7f2834
@@ -126,12 +126,16 @@ const dashboard = handleActions({
|
||||
const {
|
||||
version,
|
||||
announcement_url: announcementUrl,
|
||||
new_version: newVersion,
|
||||
can_autoupdate: canAutoUpdate,
|
||||
} = payload;
|
||||
|
||||
const newState = {
|
||||
...state,
|
||||
version,
|
||||
announcementUrl,
|
||||
newVersion,
|
||||
canAutoUpdate,
|
||||
isUpdateAvailable: true,
|
||||
};
|
||||
return newState;
|
||||
@@ -140,6 +144,13 @@ const dashboard = handleActions({
|
||||
return state;
|
||||
},
|
||||
|
||||
[actions.getUpdateRequest]: state => ({ ...state, processingUpdate: true }),
|
||||
[actions.getUpdateFailure]: state => ({ ...state, processingUpdate: false }),
|
||||
[actions.getUpdateSuccess]: (state) => {
|
||||
const newState = { ...state, processingUpdate: false };
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.getFilteringRequest]: state => ({ ...state, processingFiltering: true }),
|
||||
[actions.getFilteringFailure]: state => ({ ...state, processingFiltering: false }),
|
||||
[actions.getFilteringSuccess]: (state, { payload }) => {
|
||||
@@ -187,6 +198,7 @@ const dashboard = handleActions({
|
||||
processingVersion: true,
|
||||
processingFiltering: true,
|
||||
processingClients: true,
|
||||
processingUpdate: false,
|
||||
upstreamDns: '',
|
||||
bootstrapDns: '',
|
||||
allServers: false,
|
||||
|
||||
Reference in New Issue
Block a user