From d24a01c5e14bc6e5215818a4f9df7b4caf7ae627 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Tue, 25 Feb 2025 02:58:37 +0530 Subject: [PATCH 1/3] feat: set proxy config true on form submit --- src/components/proxy/ProxyForm.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/proxy/ProxyForm.tsx b/src/components/proxy/ProxyForm.tsx index 08a4ce8b..520f1bd9 100644 --- a/src/components/proxy/ProxyForm.tsx +++ b/src/components/proxy/ProxyForm.tsx @@ -100,6 +100,7 @@ const ProxyForm: React.FC = () => { try { const response = await sendProxyConfig(proxyConfigForm); if (response) { + setIsProxyConfigured(true); notify('success', t('proxy.notifications.config_success')); } else { notify('error', t('proxy.notifications.config_error')); From febad143647d475123b1b3474caebe700df01a02 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Tue, 25 Feb 2025 02:59:08 +0530 Subject: [PATCH 2/3] feat: set proxy --- src/components/proxy/ProxyForm.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/proxy/ProxyForm.tsx b/src/components/proxy/ProxyForm.tsx index 520f1bd9..75e7d98b 100644 --- a/src/components/proxy/ProxyForm.tsx +++ b/src/components/proxy/ProxyForm.tsx @@ -101,6 +101,7 @@ const ProxyForm: React.FC = () => { const response = await sendProxyConfig(proxyConfigForm); if (response) { setIsProxyConfigured(true); + setProxy({ proxy_url: proxyConfigForm.server_url, auth: requiresAuth }); notify('success', t('proxy.notifications.config_success')); } else { notify('error', t('proxy.notifications.config_error')); From cc27a462630fb656dc8984cf0a788f8a159821c0 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Tue, 25 Feb 2025 02:59:41 +0530 Subject: [PATCH 3/3] feat: fetch proxy config on form submit --- src/components/proxy/ProxyForm.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/proxy/ProxyForm.tsx b/src/components/proxy/ProxyForm.tsx index 75e7d98b..36dfa0b6 100644 --- a/src/components/proxy/ProxyForm.tsx +++ b/src/components/proxy/ProxyForm.tsx @@ -103,6 +103,7 @@ const ProxyForm: React.FC = () => { setIsProxyConfigured(true); setProxy({ proxy_url: proxyConfigForm.server_url, auth: requiresAuth }); notify('success', t('proxy.notifications.config_success')); + fetchProxyConfig(); } else { notify('error', t('proxy.notifications.config_error')); console.log(`${t('proxy.notifications.config_error')} ${response}`)