Request language from server

This commit is contained in:
Ildar Kamalov
2018-11-22 17:56:57 +03:00
parent 83544ab0f6
commit 63f20bc397
5 changed files with 81 additions and 1 deletions

View File

@@ -49,6 +49,7 @@ const dashboard = handleActions({
querylog_enabled: queryLogEnabled,
upstream_dns: upstreamDns,
protection_enabled: protectionEnabled,
language,
} = payload;
const newState = {
...state,
@@ -60,6 +61,7 @@ const dashboard = handleActions({
queryLogEnabled,
upstreamDns: upstreamDns.join('\n'),
protectionEnabled,
language,
};
return newState;
},
@@ -145,6 +147,11 @@ const dashboard = handleActions({
const { upstreamDns } = payload;
return { ...state, upstreamDns };
},
[actions.getLanguageSuccess]: (state, { payload }) => {
const newState = { ...state, language: payload };
return newState;
},
}, {
processing: true,
isCoreRunning: false,