mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-13 20:08:05 +08:00
✨ Sync 2026-11-11 01:22:09
This commit is contained in:
1 parent
9c5aa2e662
commit
cc21462d8a
48 files changed
+9760
-59
No files matched your search
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-theme-vantage
|
||||
PKG_VERSION:=1.0.17
|
||||
PKG_RELEASE:=39
|
||||
PKG_RELEASE:=40
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
|
||||
LUCI_TITLE:=Vantage theme
|
||||
|
||||
@@ -2656,7 +2656,7 @@ html:not([data-darkmode="true"]) .vt-login-page::before {
|
||||
.vt-login-head { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-6); }
|
||||
.vt-login-mark { flex: none; }
|
||||
.vt-login-title { margin: 0; font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
|
||||
.vt-login-error {
|
||||
.vt-login-error, .vt-login-info {
|
||||
margin: 0 0 var(--sp-4);
|
||||
padding: var(--sp-2) var(--sp-3);
|
||||
border: 1px solid color-mix(in srgb, var(--err) 45%, transparent);
|
||||
@@ -2665,6 +2665,11 @@ html:not([data-darkmode="true"]) .vt-login-page::before {
|
||||
border-radius: var(--r);
|
||||
font-size: var(--fs-sm);
|
||||
}
|
||||
.vt-login-info {
|
||||
border-color: color-mix(in srgb, var(--info) 45%, transparent);
|
||||
border-left-color: var(--info);
|
||||
background: var(--info-soft);
|
||||
}
|
||||
.vt-login-form { display: flex; flex-direction: column; gap: var(--sp-4); }
|
||||
.vt-field { display: flex; flex-direction: column; gap: 6px; }
|
||||
.vt-field-label { color: var(--text-3); font-size: var(--fs-micro); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
|
||||
|
||||
@@ -76,7 +76,7 @@ msgctxt "vantage-theme"
|
||||
msgid "Appearance"
|
||||
msgstr ""
|
||||
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:50
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:52
|
||||
msgid "Authorization Required"
|
||||
msgstr ""
|
||||
|
||||
@@ -296,7 +296,7 @@ msgctxt "vantage-theme"
|
||||
msgid "Input"
|
||||
msgstr ""
|
||||
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:54
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:56
|
||||
msgid "Invalid username and/or password! Please try again."
|
||||
msgstr ""
|
||||
|
||||
@@ -314,8 +314,8 @@ msgctxt "vantage-theme"
|
||||
msgid "Light"
|
||||
msgstr ""
|
||||
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:30
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:66
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:32
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:85
|
||||
msgid "Log in"
|
||||
msgstr ""
|
||||
|
||||
@@ -441,7 +441,7 @@ msgctxt "vantage-theme"
|
||||
msgid "Passes unmatched"
|
||||
msgstr ""
|
||||
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:63
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:65
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
@@ -590,7 +590,7 @@ msgstr ""
|
||||
msgid "Used"
|
||||
msgstr ""
|
||||
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:59
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:61
|
||||
msgid "Username"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ msgctxt "vantage-theme"
|
||||
msgid "Appearance"
|
||||
msgstr "外观"
|
||||
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:50
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:52
|
||||
msgid "Authorization Required"
|
||||
msgstr "需要授权"
|
||||
|
||||
@@ -307,7 +307,7 @@ msgctxt "vantage-theme"
|
||||
msgid "Input"
|
||||
msgstr "输入"
|
||||
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:54
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:56
|
||||
msgid "Invalid username and/or password! Please try again."
|
||||
msgstr "用户名或密码错误,请重试。"
|
||||
|
||||
@@ -325,8 +325,8 @@ msgctxt "vantage-theme"
|
||||
msgid "Light"
|
||||
msgstr "浅色"
|
||||
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:30
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:66
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:32
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:85
|
||||
msgid "Log in"
|
||||
msgstr "登录"
|
||||
|
||||
@@ -452,7 +452,7 @@ msgctxt "vantage-theme"
|
||||
msgid "Passes unmatched"
|
||||
msgstr "放行未匹配流量"
|
||||
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:63
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:65
|
||||
msgid "Password"
|
||||
msgstr "密码"
|
||||
|
||||
@@ -600,7 +600,7 @@ msgstr "使用浅色主题"
|
||||
msgid "Used"
|
||||
msgstr "已用"
|
||||
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:59
|
||||
#: luci-theme-vantage/ucode/template/themes/vantage/sysauth.ut:61
|
||||
msgid "Username"
|
||||
msgstr "用户名"
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
const look_theme = look('theme', [ 'auto', 'light', 'dark' ]);
|
||||
const look_login = look('login', [ 'grid', 'stars', 'none' ]);
|
||||
const host = (() => { const h = uci.get_first('system', 'system', 'hostname'); return (type(h) == 'string' && length(h)) ? substr(h, 0, 63) : null; })();
|
||||
// A pending challenge is guidance until the user submits a response.
|
||||
const auth_failed = auth_plugin && length(filter(auth_fields ?? [], field => length(http.formvalue(field.name) ?? '')));
|
||||
-%}
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ entityencode(dispatcher.lang ?? 'en', true) }}" data-darkmode="true" data-vt-look-theme="{{ look_theme }}" data-vt-look-login="{{ look_login }}">
|
||||
@@ -57,27 +59,44 @@
|
||||
<h1 class="vt-login-title">{{ entityencode(host ?? _('Authorization Required'), true) }}</h1>
|
||||
</div>
|
||||
|
||||
{% if (fuser): %}
|
||||
{% if (fuser && !auth_plugin): %}
|
||||
<div class="vt-login-error" role="alert">{{ entityencode(_('Invalid username and/or password! Please try again.'), true) }}</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="post" class="vt-login-form" data-https-ports="{{ entityencode(sprintf('%J', tls_ports), true) }}" data-https-probe="{{ entityencode(resource + '/icons/loading.svg', true) }}">
|
||||
<label class="vt-field">
|
||||
<label class="vt-field" for="luci_username">
|
||||
<span class="vt-field-label">{{ entityencode(_('Username'), true) }}</span>
|
||||
<input class="cbi-input-text" type="text" name="luci_username" autocomplete="username" autocapitalize="off" spellcheck="false" required value="{{ entityencode(duser ?? '', true) }}">
|
||||
<input class="cbi-input-text" id="luci_username" type="text" name="luci_username" autocomplete="username" autocapitalize="off" spellcheck="false" required value="{{ entityencode(duser ?? '', true) }}">
|
||||
</label>
|
||||
<label class="vt-field">
|
||||
<label class="vt-field" for="luci_password">
|
||||
<span class="vt-field-label">{{ entityencode(_('Password'), true) }}</span>
|
||||
<input class="cbi-input-password" type="password" name="luci_password" autocomplete="current-password" autofocus>
|
||||
<input class="cbi-input-password" id="luci_password" type="password" name="luci_password" autocomplete="current-password">
|
||||
</label>
|
||||
{% if (auth_fields): %}
|
||||
{% for (let field in auth_fields): %}
|
||||
<label class="vt-field" for="{{ entityencode(field.name, true) }}">
|
||||
<span class="vt-field-label">{{ entityencode(_(field.label ?? field.name), true) }}</span>
|
||||
<input class="cbi-input-text" id="{{ entityencode(field.name, true) }}" type="{{ entityencode(field.type ?? 'text', true) }}" name="{{ entityencode(field.name, true) }}"
|
||||
{% if (field.placeholder): %}placeholder="{{ entityencode(field.placeholder, true) }}"{% endif %}
|
||||
{% if (field.inputmode): %}inputmode="{{ entityencode(field.inputmode, true) }}"{% endif %}
|
||||
{% if (field.pattern): %}pattern="{{ entityencode(field.pattern, true) }}"{% endif %}
|
||||
{% if (field.maxlength): %}maxlength="{{ entityencode('' + field.maxlength, true) }}"{% endif %}
|
||||
{% if (field.autocomplete): %}autocomplete="{{ entityencode(field.autocomplete, true) }}"{% endif %}
|
||||
{% if (field.required): %}required{% endif %}>
|
||||
</label>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if (auth_message): %}
|
||||
<div class="{{ auth_failed ? 'vt-login-error' : 'vt-login-info' }}" role="{{ auth_failed ? 'alert' : 'status' }}">{{ entityencode(auth_message, true) }}</div>
|
||||
{% endif %}
|
||||
<button type="submit" class="btn cbi-button cbi-button-apply vt-login-submit">{{ entityencode(_('Log in'), true) }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</main>
|
||||
<script>
|
||||
(function (form) {
|
||||
var pw = document.querySelector('input[name="luci_password"]');
|
||||
if (pw) pw.focus();
|
||||
var input = form && form.querySelector('input[name="luci_password"]');
|
||||
if (input) input.focus();
|
||||
if (!form || location.protocol === 'https:') return;
|
||||
var ports = [];
|
||||
try { ports = JSON.parse(form.getAttribute('data-https-ports') || '[]'); } catch (e) {}
|
||||
|
||||
Reference in new issue
Block a user