mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-11-23 04:41:41 +01:00
style(proxy): clean settings whitespace
This commit is contained in:
1 parent
cc37959e14
commit
3afff5ed8a
1 file changed
+1
-1
@@ -7,7 +7,7 @@ async function loadProxySettings() {
|
||||
const response = await apiFetch('/api/config');
|
||||
if (!response.ok) throw new Error(window.t('proxySettings.loadError'));
|
||||
const saved = (await response.json()).proxy || {};
|
||||
const cfg = saved.mode ? saved : {};
|
||||
const cfg = saved.mode ? saved : {};
|
||||
const defaults = {mode: 'manual', proxy_url: '', proxy_pool: '', proxy_source: '', strategy: 'sticky', max_attempts: 3, cooldown: 60, min_switch_interval: 60};
|
||||
for (const [key, fallback] of Object.entries(defaults)) {
|
||||
document.getElementById(`proxy-setting-${key}`).value = cfg[key] === undefined || cfg[key] === '' || (key === 'max_attempts' && cfg[key] === 0) ? fallback : cfg[key];
|
||||
|
||||
Reference in new issue
Block a user