mirror of
https://github.com/openwrt/luci.git
synced 2026-05-31 02:21:50 +08:00
luci-mod: use built-in format for wifi hostname
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
@@ -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 || '?';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user