ui: simplify element-calling port modal — trim verbose steps and remove extra verification task
- Replace 3 long instruction bullets with 1 plaintext line - Shorten intro (drop long parenthetical on IP location) - Remove 'how to confirm it worked' note — if router applies rules, ports are open - Keep port table intact (40000-40099 current set)
This commit is contained in:
@@ -67,7 +67,7 @@ function renderPortForwardGuideHtml(ports, opts) {
|
|||||||
var noteClass = opts.noteClass || "port-req-hint";
|
var noteClass = opts.noteClass || "port-req-hint";
|
||||||
var ipHtml = opts.internalIp
|
var ipHtml = opts.internalIp
|
||||||
? '<code class="port-req-internal-ip">' + escHtml(opts.internalIp) + '</code>'
|
? '<code class="port-req-internal-ip">' + escHtml(opts.internalIp) + '</code>'
|
||||||
: 'this computer’s <strong>internal IP</strong> (shown as “Internal IP” at the top of the Hub dashboard)';
|
: 'this computer’s <strong>internal IP</strong>';
|
||||||
|
|
||||||
var rows = (ports || []).map(function(p) {
|
var rows = (ports || []).map(function(p) {
|
||||||
return '<tr>' +
|
return '<tr>' +
|
||||||
@@ -78,26 +78,17 @@ function renderPortForwardGuideHtml(ports, opts) {
|
|||||||
}).join("");
|
}).join("");
|
||||||
|
|
||||||
var forWhat = opts.serviceName
|
var forWhat = opts.serviceName
|
||||||
? 'For <strong>' + escHtml(opts.serviceName) + '</strong> to be reachable from outside your home network, open'
|
? 'To make <strong>' + escHtml(opts.serviceName) + '</strong> reachable from outside your home, forward these ports to ' + ipHtml + ':'
|
||||||
: 'Open';
|
: 'Forward these ports to ' + ipHtml + ':';
|
||||||
|
|
||||||
return '<p class="' + introClass + '">' +
|
return '<p class="' + introClass + '">' + forWhat + '</p>' +
|
||||||
forWhat + ' the ports below in your router’s <strong>port forwarding</strong> settings ' +
|
'<p class="port-req-steps" style="margin-top:6px;margin-bottom:10px;font-size:0.92em;color:#555;">' +
|
||||||
'and point them at ' + ipHtml + '.' +
|
'Set the internal and external port to the <strong>same number</strong>. Match <strong>TCP</strong> or <strong>UDP</strong> exactly. For ranges like <strong>40000-40099</strong>, use your router’s range fields (start 40000, end 40099).' +
|
||||||
'</p>' +
|
'</p>' +
|
||||||
'<ul class="port-req-steps">' +
|
|
||||||
'<li>Set the <strong>internal (private) port</strong> and the <strong>external (public) port</strong> to the <strong>same number</strong>.</li>' +
|
|
||||||
'<li>Match the <strong>protocol</strong> exactly — a rule set to TCP will not pass UDP traffic. Where the table says <strong>TCP + UDP</strong>, create both rules (or pick “Both”/“TCP/UDP” if your router offers it).</li>' +
|
|
||||||
'<li>For a range such as <strong>40000-40099</strong>, use your router’s port-range fields — start 40000, end 40099 — rather than one rule per port.</li>' +
|
|
||||||
'</ul>' +
|
|
||||||
'<table class="' + tableClass + '">' +
|
'<table class="' + tableClass + '">' +
|
||||||
'<thead><tr><th>Port(s)</th><th>Protocol</th><th>Used for</th></tr></thead>' +
|
'<thead><tr><th>Port(s)</th><th>Protocol</th><th>Used for</th></tr></thead>' +
|
||||||
'<tbody>' + rows + '</tbody>' +
|
'<tbody>' + rows + '</tbody>' +
|
||||||
'</table>' +
|
'</table>';
|
||||||
'<p class="' + noteClass + '">' +
|
|
||||||
'📱 <strong>How to confirm it worked:</strong> forwarding happens on your router, so it can only be verified from outside your network. ' +
|
|
||||||
'Turn Wi-Fi off on your phone and open the service over mobile data — if it loads, your ports are open.' +
|
|
||||||
'</p>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatDuration(seconds) {
|
function formatDuration(seconds) {
|
||||||
|
|||||||
Reference in New Issue
Block a user