From 939739d0c7eaa035f30450e889de973f2efcc3a6 Mon Sep 17 00:00:00 2001 From: 0xacb Date: Tue, 27 Jan 2026 17:09:53 +0000 Subject: [PATCH] fix: adding confirmation modal to confirm gateway url change --- ui/src/ui/app-settings.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/src/ui/app-settings.ts b/ui/src/ui/app-settings.ts index e269742b2..018bb9f87 100644 --- a/ui/src/ui/app-settings.ts +++ b/ui/src/ui/app-settings.ts @@ -98,7 +98,12 @@ export function applySettingsFromUrl(host: SettingsHost) { if (gatewayUrlRaw != null) { const gatewayUrl = gatewayUrlRaw.trim(); if (gatewayUrl && gatewayUrl !== host.settings.gatewayUrl) { - applySettings(host, { ...host.settings, gatewayUrl }); + const confirmed = window.confirm( + `Change gateway URL to:\n${gatewayUrl}\n\nThis will reconnect to a different gateway server. Only confirm if you trust this URL.`, + ); + if (confirmed) { + applySettings(host, { ...host.settings, gatewayUrl }); + } } params.delete("gatewayUrl"); shouldCleanUrl = true;