Pull request: 4898 fix redirect to current protocol on tls settings change

Updates #4898

Squashed commit of the following:

commit b10b0a5adeeb44375912d34a9ef60a7f4ff9688c
Merge: 9d4bc0ef defde7d0
Author: Ildar Kamalov <ik@adguard.com>
Date:   Wed Dec 21 17:49:52 2022 +0300

    Merge branch 'master' into 4898-tls-redirect

commit 9d4bc0efaf1639380325f75684514386ec581206
Author: Ildar Kamalov <ik@adguard.com>
Date:   Wed Dec 21 16:39:17 2022 +0300

    fix helper

commit cb5b43e65c6224b6d9fe012b52a18ee8e2e1c19a
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Dec 19 19:16:07 2022 +0300

    client: reload page on tls enable
This commit is contained in:
Ildar Kamalov 2022-12-21 18:13:07 +03:00
parent defde7d0fe
commit e481922d91
2 changed files with 5 additions and 6 deletions

View File

@ -41,6 +41,8 @@ export const setTlsConfig = (config) => async (dispatch, getState) => {
response.certificate_chain = atob(response.certificate_chain); response.certificate_chain = atob(response.certificate_chain);
response.private_key = atob(response.private_key); response.private_key = atob(response.private_key);
redirectToCurrentProtocol(response, httpPort);
const dnsStatus = await apiClient.getGlobalStatus(); const dnsStatus = await apiClient.getGlobalStatus();
if (dnsStatus) { if (dnsStatus) {
dispatch(dnsStatusSuccess(dnsStatus)); dispatch(dnsStatusSuccess(dnsStatus));
@ -48,7 +50,6 @@ export const setTlsConfig = (config) => async (dispatch, getState) => {
dispatch(setTlsConfigSuccess(response)); dispatch(setTlsConfigSuccess(response));
dispatch(addSuccessToast('encryption_config_saved')); dispatch(addSuccessToast('encryption_config_saved'));
redirectToCurrentProtocol(response, httpPort);
} catch (error) { } catch (error) {
dispatch(addErrorToast({ error })); dispatch(addErrorToast({ error }));
dispatch(setTlsConfigFailure()); dispatch(setTlsConfigFailure());

View File

@ -172,10 +172,8 @@
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 2.5rem;
--size: 2.5rem; height: 2.5rem;
width: var(--size);
height: var(--size);
padding: 0; padding: 0;
margin-left: 0.9375rem; margin-left: 0.9375rem;
background-color: transparent; background-color: transparent;
@ -472,7 +470,7 @@
.filteringRules__filter { .filteringRules__filter {
font-style: italic; font-style: italic;
font-weight: normal; font-weight: 400;
margin-bottom: 1rem; margin-bottom: 1rem;
} }