Pull request: home: show version in install api
Closes #4026. Squashed commit of the following: commit bcd1315a10e819daee3aee323427d90a27860b4a Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Jan 18 14:57:49 2022 +0300 openapi: fix example commit b56e27c5ac1fc7c3f595057d77607479d72ec50a Author: Ildar Kamalov <ik@adguard.com> Date: Tue Jan 18 14:55:51 2022 +0300 client: show version on install page commit 95dfbfaa1235deef7b55e51457d11c677f6ef6b5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Jan 18 14:29:08 2022 +0300 home: show version in install api
This commit is contained in:
@@ -12,13 +12,19 @@ const install = handleActions({
|
||||
[actions.getDefaultAddressesRequest]: (state) => ({ ...state, processingDefault: true }),
|
||||
[actions.getDefaultAddressesFailure]: (state) => ({ ...state, processingDefault: false }),
|
||||
[actions.getDefaultAddressesSuccess]: (state, { payload }) => {
|
||||
const { interfaces } = payload;
|
||||
const { interfaces, version } = payload;
|
||||
const web = { ...state.web, port: payload.web_port };
|
||||
const dns = { ...state.dns, port: payload.dns_port };
|
||||
|
||||
const newState = {
|
||||
...state, web, dns, interfaces, processingDefault: false,
|
||||
...state,
|
||||
web,
|
||||
dns,
|
||||
interfaces,
|
||||
processingDefault: false,
|
||||
dnsVersion: version,
|
||||
};
|
||||
|
||||
return newState;
|
||||
},
|
||||
|
||||
@@ -64,6 +70,7 @@ const install = handleActions({
|
||||
error: '',
|
||||
},
|
||||
interfaces: {},
|
||||
dnsVersion: '',
|
||||
});
|
||||
|
||||
export default combineReducers({
|
||||
|
||||
Reference in New Issue
Block a user