fix(settings): fix latency ping and tunnel auto-reconnect defaults
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:
Raven Scott
2026-03-01 01:10:59 -05:00
parent 10ac56438f
commit 32cd108480
5 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -11,8 +11,8 @@ const SETTINGS_DEFAULTS = {
disableOnFileUrls: false,
backupRetention: 5,
backupIntervalHours: 0,
tunnelAutoReconnect: false,
latencyPingEnabled: true,
tunnelAutoReconnect: true,
latencyPingEnabled: false,
latencyPingIntervalMs: 5000
};
+1 -1
View File
@@ -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;">
+1 -1
View File
@@ -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');
+1 -1
View File
@@ -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;">
+2 -2
View File
@@ -20,8 +20,8 @@ const SETTINGS_DEFAULTS = {
disableOnFileUrls: false,
backupRetention: 5,
backupIntervalHours: 0,
tunnelAutoReconnect: false,
latencyPingEnabled: true,
tunnelAutoReconnect: true,
latencyPingEnabled: false,
latencyPingIntervalMs: 5000
};