Update vantage.patch

This commit is contained in:
kiddin9 authored and GitHub committed 2026-11-05 19:21:46 +08:00
1 parent 254dca6210
commit 9c1c52b048
1 file changed
+12 -34
+12 -34
View File
@@ -29,18 +29,9 @@
--- a/luci-app-vantage/htdocs/luci-static/resources/vantage/app.css
+++ b/luci-app-vantage/htdocs/luci-static/resources/vantage/app.css
@@ -156,6 +156,8 @@ html[data-darkmode="true"] .vt-app {
position: static; z-index: auto; display: block; overflow: visible;
margin: 0; padding: 0; border: 0; border-radius: 0;
background: none; box-shadow: none; color: inherit; text-shadow: none;
+ width: 100%;
+ flex-direction: unset;
}
.vt-app :where(header, footer) :where(p, a, span) { line-height: inherit; text-shadow: none; }
.vt-app :where(header) :where(a) { color: inherit; }
@@ -477,6 +479,12 @@ html[data-darkmode="true"] .vt-app {
@@ -568,6 +568,12 @@ html[data-darkmode="true"] .vt-app {
display: flex; align-items: center; gap: 14px;
margin: 2px 0 14px;
margin: 2px 0 var(--vt-sp-4);
}
+header::after {
+ height:0 !important;
@@ -108,7 +99,7 @@
.cbi-section > p:last-child { margin-bottom: 0; }
@@ -1982,7 +1988,25 @@ html:not([data-darkmode="true"]) .vt-login-page {
}
/* the starfield (login.js), between the grid and the card */
/* the backdrop (login.js: packets or starfield), between the grid and the card */
.vt-login-sky { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
-.vt-login { position: relative; width: min(380px, 100%); }
+.vt-login {
@@ -157,17 +148,17 @@
--- a/luci-theme-vantage/ucode/template/themes/vantage/header.ut
+++ b/luci-theme-vantage/ucode/template/themes/vantage/header.ut
@@ -12,6 +12,8 @@
const authed = !!ctx.authsession;
const page_title = (authed && dispatched?.title) ? striptags(_(dispatched.title)) : 'LuCI';
@@ -16,6 +16,8 @@
const found = !!dispatched?.action?.type && dispatched.action.type != 'firstchild';
const page_title = !authed ? null : !found ? _('Not found') : dispatched?.title ? striptags(_(dispatched.title)) : null;
const lang = entityencode(dispatcher.lang ?? 'en', true);
+ const boardinfo = ubus.call("system", "board");
+ const hostname = striptags(boardinfo?.hostname ?? '?');
-%}
<!DOCTYPE html>
<html lang="{{ lang }}" data-darkmode="true">
@@ -22,8 +24,8 @@
<title>{{ entityencode(page_title, true) }} · LuCI</title>
@@ -26,8 +28,8 @@
<title>{{ page_title ? entityencode(page_title, true) + ' · ' : '' }}LuCI</title>
<script>
(function (r) {
- var p = 'auto', rail = '';
@@ -177,12 +168,11 @@
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);
@@ -46,8 +48,15 @@
@@ -50,7 +52,15 @@
{% 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) }}">
- <svg viewBox="0 0 32 32" width="32" height="32" 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>
- <span class="vt-brand-word">Vantage</span>
+ <svg viewBox="0 0 32 32" width="32" height="32" 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>
@@ -198,16 +188,7 @@
--- a/luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut
+++ b/luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut
@@ -12,6 +12,8 @@
if (type(tls) == 'string')
tls = split(tls, /\s+/);
const tls_ports = uniq(filter(map(tls, e => +(match(e, /\d+$/)?.[0] ?? 0)), p => (p > 0 && p <= 65535)));
+ const boardinfo = ubus.call("system", "board");
+ const hostname = striptags(boardinfo?.hostname ?? '?');
-%}
<!DOCTYPE html>
<html lang="{{ entityencode(dispatcher.lang ?? 'en', true) }}" data-darkmode="true">
@@ -37,9 +39,16 @@
@@ -37,7 +37,14 @@
<main class="vt-login">
<div class="vt-login-card">
<div class="vt-login-head">
@@ -220,12 +201,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">Vantage</h1>
+ <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(_('Authorization Required'), true) }}</h1>
</div>
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