fix(settings): fix latency ping and tunnel auto-reconnect defaults
CI / Build & Test (push) Successful in 2m54s
CI / Build & Test (push) Successful in 2m54s
- Default latencyPingEnabled to false so badges are hidden until opted in - Fix toggleLatencyPing sync condition from !== false to === true to match the new default correctly - Default tunnelAutoReconnect to true so tunnels reconnect automatically out of the box - Hide latency badges in virtual hosts and service tunnels tables when latency ping is disabled
This commit is contained in:
@@ -11,8 +11,8 @@ const SETTINGS_DEFAULTS = {
|
||||
disableOnFileUrls: false,
|
||||
backupRetention: 5,
|
||||
backupIntervalHours: 0,
|
||||
tunnelAutoReconnect: false,
|
||||
latencyPingEnabled: true,
|
||||
tunnelAutoReconnect: true,
|
||||
latencyPingEnabled: false,
|
||||
latencyPingIntervalMs: 5000
|
||||
};
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ function updateServiceTunnelsTable(state) {
|
||||
</td>
|
||||
<td>
|
||||
${stateTag(t.state)}
|
||||
${t.localPort != null ? `<span class="latency-badge" data-ping-host="127.0.0.1" data-ping-port="${t.localPort}" style="margin-left:4px;font-size:10px;color:var(--text4);">…ms</span>` : ''}
|
||||
${t.localPort != null && settings.latencyPingEnabled !== false ? `<span class="latency-badge" data-ping-host="127.0.0.1" data-ping-port="${t.localPort}" style="margin-left:4px;font-size:10px;color:var(--text4);">…ms</span>` : ''}
|
||||
</td>
|
||||
<td>
|
||||
<div style="display:flex;align-items:center;gap:6px;">
|
||||
|
||||
@@ -29,7 +29,7 @@ function updateSettingsUI() {
|
||||
$('toggleDebug')?.classList.toggle('active', settings.debug === true);
|
||||
$('toggleDisableFileUrls')?.classList.toggle('active', settings.disableOnFileUrls === true);
|
||||
$('toggleTheme')?.classList.toggle('active', document.documentElement.getAttribute('data-theme') === 'light');
|
||||
$('toggleLatencyPing')?.classList.toggle('active', settings.latencyPingEnabled !== false);
|
||||
$('toggleLatencyPing')?.classList.toggle('active', settings.latencyPingEnabled === true);
|
||||
const proxyPortEl = $('proxyPort');
|
||||
const readyTimeoutMsEl = $('readyTimeoutMs');
|
||||
const backupRetentionEl = $('backupRetention');
|
||||
|
||||
@@ -70,7 +70,7 @@ function updateConnectionsTable(state) {
|
||||
<td class="mono" style="font-size:11px;color:var(--text3);">${escapeHtml(backend)}</td>
|
||||
<td>
|
||||
${stateTag(v.state)}
|
||||
${v.localPort != null ? `<span class="latency-badge" data-ping-host="127.0.0.1" data-ping-port="${v.localPort}" style="margin-left:4px;font-size:10px;color:var(--text4);">…ms</span>` : ''}
|
||||
${v.localPort != null && settings.latencyPingEnabled !== false ? `<span class="latency-badge" data-ping-host="127.0.0.1" data-ping-port="${v.localPort}" style="margin-left:4px;font-size:10px;color:var(--text4);">…ms</span>` : ''}
|
||||
</td>
|
||||
<td>
|
||||
<div style="display:flex;align-items:center;gap:6px;">
|
||||
|
||||
@@ -20,8 +20,8 @@ const SETTINGS_DEFAULTS = {
|
||||
disableOnFileUrls: false,
|
||||
backupRetention: 5,
|
||||
backupIntervalHours: 0,
|
||||
tunnelAutoReconnect: false,
|
||||
latencyPingEnabled: true,
|
||||
tunnelAutoReconnect: true,
|
||||
latencyPingEnabled: false,
|
||||
latencyPingIntervalMs: 5000
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user