From 6dfb14e9231150dda223662e4829704c7674f9ff Mon Sep 17 00:00:00 2001 From: Martin Hebnes Pedersen Date: Wed, 1 May 2024 09:25:37 +0200 Subject: [PATCH] Retain the full URL when selecting a connect alias Resolves #340 --- web/src/js/app.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/web/src/js/app.js b/web/src/js/app.js index 7e0befcc..1bb66e7a 100644 --- a/web/src/js/app.js +++ b/web/src/js/app.js @@ -580,9 +580,14 @@ function setConnectValues(url) { refreshExtraInputGroups(); onConnectInputChange(); onConnectFreqChange(); + setConnectURL(url); } -function getConnectURL() { +function getConnectURL() { return $('#connectURLPreview').text(); } + +function setConnectURL(url) { $('#connectURLPreview').text(url); } + +function buildConnectURL() { let url = $('#transportSelect').val() + '://' + $('#addrInput').val() + '/' + $('#targetInput').val(); @@ -678,7 +683,7 @@ function onConnectBandwidthChange() { } function onConnectInputChange() { - $('#connectURLPreview').empty().append(getConnectURL()); + setConnectURL(buildConnectURL()); } function refreshExtraInputGroups() {