Update vantage.patch

This commit is contained in:
kiddin9 authored and GitHub committed 2026-11-08 23:47:58 +08:00
1 parent 80ca70b697
commit 5a5196e2d6
1 file changed
+5 -29
+5 -29
View File
@@ -165,16 +165,7 @@
--- a/luci-theme-vantage/ucode/template/themes/vantage/header.ut
+++ b/luci-theme-vantage/ucode/template/themes/vantage/header.ut
@@ -53,6 +53,8 @@
});
return would ? 'relogin' : 'no';
})();
+const boardinfo = ubus.call("system", "board");
+const hostname = striptags(boardinfo?.hostname ?? '?');
-%}
<!DOCTYPE html>
<html lang="{{ lang }}" data-darkmode="true" data-vt-look-theme="{{ look_theme }}" data-vt-look-login="{{ look_login }}" data-vt-look-backdrop="{{ look_backdrop }}" data-vt-look-chart="{{ look_chart }}" data-vt-look-layout="{{ look_layout }}" data-vt-look-save="{{ look_save }}">
@@ -73,7 +75,7 @@
@@ -74,7 +74,7 @@
return ok[0];
}
var p = look('theme', 'vantage.theme.own', 'vantage.theme', [ 'auto', 'light', 'dark' ]), rail = '';
@@ -183,7 +174,7 @@
var dark = (p === 'dark') || (p !== 'light' && !!(window.matchMedia && matchMedia('(prefers-color-scheme: dark)').matches));
r.setAttribute('data-darkmode', dark ? 'true' : 'false');
r.setAttribute('data-theme', p);
@@ -50,7 +52,15 @@
@@ -99,7 +99,14 @@
{% if (authed): %}
<nav class="vt-rail" id="vt-rail" aria-label="{{ entityencode(_('Main navigation', 'vantage-theme'), true) }}">
<a class="vt-brand" href="{{ dispatcher.build_url('admin') }}" aria-label="{{ entityencode(_('Home', 'vantage-theme'), true) }}">
@@ -196,28 +187,17 @@
+ <circle cx="21.5" cy="10.5" r="1.9" class="vt-brand-dot"></circle>
+ <circle cx="21.5" cy="21.5" r="1.9" class="vt-brand-dot"></circle>
+ </svg>
+ <h3 class="vt-brand-word">{{ hostname }}</h3>
<span class="vt-brand-name" id="vt-brand-name" hidden></span>
</a>
<ul class="vt-rail-list" id="vt-rail-list"></ul>
<div class="vt-rail-foot">
--- a/luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut
+++ b/luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut
@@ -17,6 +17,8 @@
const look = (opt, ok) => { const v = uci.get('vantage_theme', 'appearance', opt); return (type(v) == 'string' && index(ok, v) >= 0) ? v : ''; };
const look_theme = look('theme', [ 'auto', 'light', 'dark' ]);
const look_login = look('login', [ 'grid', 'stars', 'none' ]);
+ const boardinfo = ubus.call("system", "board");
+ const hostname = striptags(boardinfo?.hostname ?? '?');
-%}
<!DOCTYPE html>
<html lang="{{ entityencode(dispatcher.lang ?? 'en', true) }}" data-darkmode="true" data-vt-look-theme="{{ look_theme }}" data-vt-look-login="{{ look_login }}">
@@ -37,8 +39,18 @@
@@ -46,7 +46,14 @@
<main class="vt-login">
<div class="vt-login-card">
<div class="vt-login-head">
- <svg class="vt-login-mark" viewBox="0 0 32 32" width="44" height="44" aria-hidden="true"><rect x="1" y="1" width="30" height="30" rx="7" class="vt-brand-tile"/><path d="M9 10.5 16 22" class="vt-brand-l"/><path d="M16 22 23 10.5" class="vt-brand-r"/><circle cx="23" cy="10.5" r="1.9" class="vt-brand-dot"/></svg>
- <h1 class="vt-login-title">{{ entityencode(_('Authorization Required'), true) }}</h1>
+ <svg class="vt-login-mark" viewBox="0 0 32 32" width="44" height="44" aria-hidden="true">
+ <rect x="1" y="1" width="30" height="30" rx="7" class="vt-brand-tile"></rect>
+ <path d="M10 10.5 10 21.5" class="vt-brand-l"></path>
@@ -226,13 +206,9 @@
+ <circle cx="21.5" cy="10.5" r="1.9" class="vt-brand-dot"></circle>
+ <circle cx="21.5" cy="21.5" r="1.9" class="vt-brand-dot"></circle>
+ </svg>
+ <div>
+ <h1 class="vt-login-title">{{ hostname }}</h1>
+ <p class="vt-login-sub"><span class="vt-login-dot" aria-hidden="true"></span>{{ entityencode(_('Authorization Required'), true) }}</p>
+ </div>
<h1 class="vt-login-title">{{ entityencode(host ?? _('Authorization Required'), true) }}</h1>
</div>
{% if (fuser): %}
diff --git a/luci-theme-vantage/htdocs/luci-static/vantage/pattern.svg b/luci-theme-vantage/htdocs/luci-static/vantage/pattern.svg
new file mode 100644
index 000000000..72eb03cdc