From 61c325e0b5c3acaffd88968b11f6bc1be0905622 Mon Sep 17 00:00:00 2001 From: Chris Olin Date: Wed, 19 Aug 2026 15:26:16 -0400 Subject: [PATCH] fix: remove hardcoded desktop gateway URL default and allow clearing optional fields MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - _AddDialog: the 'Desktop Gateway URL' field defaulted to a hardcoded developer IP (http://192.168.1.193/desktop) instead of empty. - _validateAndSave: empty optional fields (gateway prefix, dashboard prefix, desktop gateway URL) were converted to null before save, but updateConnection's clear* flags require a non-null empty string to detect a clear — so these fields could never be cleared on an existing connection. Pass the raw (possibly empty) value through instead. --- lib/main.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 33a23ba7..f44b2fa9 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -876,7 +876,7 @@ class _AddDialogState extends State<_AddDialog> { _dashUser = TextEditingController(text: conn?.dashboardUsername ?? ''); _dashPass = TextEditingController(text: conn?.dashboardPassword ?? ''); _desktopGatewayUrl = TextEditingController( - text: conn?.desktopGatewayUrl ?? 'http://192.168.1.193/desktop', + text: conn?.desktopGatewayUrl ?? '', ); _dashboardProxied = conn?.dashboardProxied ?? false; _showDashboard = @@ -988,10 +988,10 @@ class _AddDialogState extends State<_AddDialog> { host, port, apiKey, - gatewayPrefix: gatewayPrefix.isEmpty ? null : gatewayPrefix, - dashboardPrefix: dashboardPrefix.isEmpty ? null : dashboardPrefix, + gatewayPrefix: gatewayPrefix, + dashboardPrefix: dashboardPrefix, dashboardProxied: _dashboardProxied, - desktopGatewayUrl: desktopGatewayUrl.isEmpty ? null : desktopGatewayUrl, + desktopGatewayUrl: desktopGatewayUrl, dashboardPort: dashPort, dashboardUsername: dashUser.isEmpty ? null : dashUser, dashboardPassword: dashPass.isEmpty ? null : dashPass,