style(proxy): clean settings whitespace

This commit is contained in:
Sycun committed 2026-11-01 00:04:15 +08:00
1 parent cc37959e14
commit 3afff5ed8a
1 file changed
+1 -1
+1 -1
View File
@@ -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];