luci-mod: use built-in format for wifi hostname

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
Paul Donald
2026-04-20 14:45:56 +02:00
parent 540ad347a7
commit 6f461a225e
2 changed files with 4 additions and 4 deletions
@@ -713,9 +713,9 @@ return view.extend({
let hint;
if (name && ipv4 && ipv6)
hint = `${name} <span class="hide-xs">(${ipv4}, ${ipv6})</span>`;
hint = `${'%h'.format(name)} <span class="hide-xs">(${ipv4}, ${ipv6})</span>`;
else if (name && (ipv4 ?? ipv6))
hint = `${name} <span class="hide-xs">(${ipv4 || ipv6})</span>`;
hint = `${'%h'.format(name)} <span class="hide-xs">(${ipv4 || ipv6})</span>`;
else
hint = name || ipv4 || ipv6 || '?';
@@ -300,9 +300,9 @@ return baseclass.extend({
let hint;
if (name && ipv4 && ipv6)
hint = '%s <span class="hide-xs">(%s, %s)</span>'.format(name, ipv4, ipv6);
hint = '%h <span class="hide-xs">(%s, %s)</span>'.format(name, ipv4, ipv6);
else if (name && (ipv4 || ipv6))
hint = '%s <span class="hide-xs">(%s)</span>'.format(name, ipv4 || ipv6);
hint = '%h <span class="hide-xs">(%s)</span>'.format(name, ipv4 || ipv6);
else
hint = name || ipv4 || ipv6 || '?';