From cb8f54a1b53fc7eec5ec5e0f4a4f507973d1948b Mon Sep 17 00:00:00 2001 From: Jan Pazdziora Date: Sat, 11 Jan 2025 11:39:10 +0100 Subject: [PATCH] luci-app-ddns: show the URL which will be used. Signed-off-by: Jan Pazdziora --- .../luci-static/resources/view/ddns/overview.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/applications/luci-app-ddns/htdocs/luci-static/resources/view/ddns/overview.js b/applications/luci-app-ddns/htdocs/luci-static/resources/view/ddns/overview.js index 8c86bf2179..46f05a3fc8 100644 --- a/applications/luci-app-ddns/htdocs/luci-static/resources/view/ddns/overview.js +++ b/applications/luci-app-ddns/htdocs/luci-static/resources/view/ddns/overview.js @@ -586,6 +586,7 @@ return view.extend({ return _this.handleGetServiceData(service).then(L.bind(function (service_data) { s.service_available = true; s.service_supported = true; + s.url = null; if (service != '-') { if (!service_data) @@ -594,6 +595,11 @@ return view.extend({ service_data = JSON.parse(service_data); if (ipv6 == "1" && !service_data.ipv6) s.service_supported = false; + else if (ipv6 == "1") { + s.url = service_data.ipv6.url; + } else { + s.url = service_data.ipv4.url; + } } } @@ -674,6 +680,14 @@ return view.extend({ }; } + if (Boolean(s.url)) { + o = s.taboption('basic', form.DummyValue, '_url', _("Update URL")); + o.rawhtml = true; + o.default = '
' + + s.url.replace(/&/g,"&").replace(//g,">") + + '
'; + } + var service_switch = s.taboption('basic', form.Button, '_switch_proto'); service_switch.modalonly = true; service_switch.title = _('Really switch service?'); -- 2.30.2