refactor: remove retired frontend residues

dev
admin 2 months ago
parent 5e71f81c5a
commit fe43fdbf9c

@ -89,8 +89,7 @@ body.vu-body .vu-kicker {
text-transform: uppercase;
}
body.vu-body :where(.vu-top-actions, .vu-hero-actions,
.vu-ticket-actions, .vu-form-actions, .vu-support-actions, .vu-invite-actions) {
body.vu-body :where(.vu-top-actions, .vu-support-actions) {
display: flex;
flex-wrap: wrap;
align-items: center;
@ -188,7 +187,7 @@ body.vu-body .vu-theme-toggle:hover {
body.vu-body :where(.vu-card, .vu-hero-main,
.vu-edit-hero-main, .vu-invite-hero-main, .vu-pay-hero-main,
.vu-profile-hero-main, .vu-support-hero-main,
.vu-edit-summary, .vu-support-summary, .vu-stat, .vu-pay-balance,
.vu-edit-summary, .vu-support-summary, .vu-pay-balance,
.vu-profile-account, .vu-invite-balance) {
min-width: 0;
padding: 26px;
@ -301,40 +300,12 @@ body.vu-body :where(.vu-hero-main, .vu-edit-hero-main,
font-size: 14px;
line-height: 1.8;
}
body.vu-body .vu-hero-actions { margin-top: 24px; }
body.vu-body :where(.vu-stat-grid, .vu-stats, .vu-home-grid, .vu-ticket-grid) {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
gap: 18px;
margin-bottom: 22px;
}
body.vu-body .vu-stat { position: relative; min-height: 142px; overflow: hidden; }
body.vu-body .vu-stat::before {
position: absolute;
inset: 0 auto 0 0;
width: 4px;
content: "";
background: linear-gradient(180deg, #36c8c9, rgba(54, 200, 201, .2));
}
body.vu-body .vu-stat > span { color: var(--vu-muted); font-size: 12px; font-weight: 700; }
body.vu-body .vu-stat strong {
display: block;
margin: 15px 0 14px;
overflow: hidden;
color: var(--vu-text);
font-size: clamp(21px, 2vw, 27px);
letter-spacing: -.4px;
text-overflow: ellipsis;
}
body.vu-body .vu-stat a,
body.vu-body .vu-text-link {
color: var(--vu-brand-strong);
font-size: 12px;
font-weight: 750;
text-decoration: none;
}
body.vu-body .vu-stat a:hover,
body.vu-body .vu-text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
body.vu-body :where(.vu-content-grid, .vu-shop-grid) {
@ -391,8 +362,8 @@ body.vu-body :where(.vu-muted, .vu-form-message, .vu-inline-message, .vu-profile
}
body.vu-body .vu-date { font-weight: 700; }
/* Forms: checkbox/radio are deliberately excluded from text-input sizing. */
body.vu-body :where(.vu-form, .vu-support-form) { display: grid; gap: 18px; }
body.vu-body :where(.vu-form-row, .vu-form-grid, .vu-invite-wallet-grid) {
body.vu-body .vu-support-form { display: grid; gap: 18px; }
body.vu-body .vu-form-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 16px;
@ -401,7 +372,7 @@ body.vu-body .vu-password-factor-grid { display: grid; gap: 16px; }
body.vu-body .vu-password-code-row { display: flex; align-items: stretch; gap: 8px; }
body.vu-body .vu-password-code-row .vu-input { min-width: 0; flex: 1 1 auto; }
body.vu-body .vu-password-code-row .vu-btn { flex: 0 0 auto; min-width: 110px; }
body.vu-body :where(.vu-field, .vu-support-field) {
body.vu-body .vu-support-field {
display: flex;
flex-direction: column;
gap: 9px;
@ -409,8 +380,7 @@ body.vu-body :where(.vu-field, .vu-support-field) {
font-size: 13px;
font-weight: 750;
}
body.vu-body :where(.vu-input, .vu-field input, .vu-field select, .vu-field textarea,
.vu-support-input),
body.vu-body :where(.vu-input, .vu-support-input),
body.vu-body input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="image"]):not([type="file"]):not([type="range"]):not([type="color"]),
body.vu-body select,
body.vu-body textarea {
@ -424,11 +394,10 @@ body.vu-body textarea {
box-shadow: inset 0 1px 1px rgba(21, 42, 63, .015);
font: inherit;
}
body.vu-body :where(.vu-input, .vu-field input, .vu-support-input)::placeholder,
body.vu-body :where(.vu-input, .vu-support-input)::placeholder,
body.vu-body input::placeholder,
body.vu-body textarea::placeholder { color: var(--vu-faint); }
body.vu-body :where(.vu-input, .vu-field input, .vu-field select, .vu-field textarea,
.vu-support-input):focus,
body.vu-body :where(.vu-input, .vu-support-input):focus,
body.vu-body input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
body.vu-body select:focus,
body.vu-body textarea:focus {
@ -678,18 +647,17 @@ body.vu-body .vu-support-message-head {
color: var(--vu-muted);
font-size: 12px;
}
body.vu-body .vu-support-message-content,
body.vu-body .vu-support-message-body p {
margin: 12px 0 0;
line-height: 1.8;
overflow-wrap: anywhere;
}
body.vu-body :where(.vu-support-info, .vu-support-meta) {
body.vu-body .vu-support-info {
display: grid;
gap: 0;
margin-bottom: 20px;
}
body.vu-body :where(.vu-support-info, .vu-support-meta) > div {
body.vu-body .vu-support-info > div {
display: flex;
align-items: center;
justify-content: space-between;
@ -697,7 +665,7 @@ body.vu-body :where(.vu-support-info, .vu-support-meta) > div {
padding: 13px 0;
border-bottom: 1px solid var(--vu-border);
}
body.vu-body :where(.vu-support-info, .vu-support-meta) span {
body.vu-body .vu-support-info span {
color: var(--vu-muted);
font-size: 12px;
}
@ -724,7 +692,6 @@ body.vu-body .vu-ticket-tag {
line-height: 1.25;
}
body.vu-body .vu-ticket-tag.is-high { color: #9b681d; background: #fff5df; }
body.vu-body .vu-ticket-tag.is-urgent { color: var(--vu-danger); background: var(--vu-danger-soft); }
body.vu-body .vu-support-ticket-main > p { display: flex; align-items: center; gap: 5px; }
body.vu-body .vu-support-ticket-main > p i { font-size: 14px; }
body.vu-body .vu-support-upload-field { display: grid; gap: 10px; }
@ -990,7 +957,6 @@ body.vu-body .vu-survey-option[aria-pressed="true"] {
body.vu-body .vu-survey-option strong { min-width: 0; flex: 1; }
body.vu-body .vu-survey-question h3 { font-size: 16px; }
body.vu-body .vu-modal,
body.vu-body .vu-pay-dialog {
position: fixed;
inset: 0;
@ -1002,14 +968,12 @@ body.vu-body .vu-pay-dialog {
background: rgba(5, 17, 30, .66);
backdrop-filter: blur(5px);
}
body.vu-body .vu-modal.is-open,
body.vu-body .vu-pay-dialog.is-open { display: flex; }
body.vu-body .vu-modal-backdrop,
body.vu-body .vu-pay-dialog-backdrop { position: absolute; inset: 0; }
body.vu-body :where(.vu-modal-panel, .vu-modal-card, .vu-pay-dialog-panel) {
body.vu-body .vu-pay-dialog-panel {
position: relative;
z-index: 1;
width: min(100%, 520px);
width: min(100%, 500px);
max-height: min(86vh, 760px);
overflow-y: auto;
padding: 30px;
@ -1019,7 +983,7 @@ body.vu-body :where(.vu-modal-panel, .vu-modal-card, .vu-pay-dialog-panel) {
border-radius: 16px;
box-shadow: 0 28px 80px rgba(4, 17, 31, .24);
}
body.vu-body .vu-pay-dialog-panel { width: min(100%, 500px); text-align: center; }
body.vu-body .vu-pay-dialog-panel { text-align: center; }
body.vu-body .vu-modal-close {
position: absolute;
top: 14px;
@ -1037,12 +1001,6 @@ body.vu-body .vu-modal-close {
font-size: 21px;
}
body.vu-body .vu-modal-close:hover { color: var(--vu-danger); background: var(--vu-danger-soft); }
body.vu-body .vu-modal-actions {
display: flex;
justify-content: flex-end;
gap: 10px;
margin-top: 24px;
}
body.vu-body .vu-modal-mark {
width: 52px;
height: 52px;
@ -1055,7 +1013,7 @@ body.vu-body .vu-modal-mark {
border-radius: 15px;
font-size: 29px;
}
body.vu-body .vu-modal-lock { overflow: hidden; }
body.vu-body.vu-modal-lock { overflow: hidden; }
body.vu-body .vu-pay-qrcode { display: flex; justify-content: center; margin: 20px 0; }
body.vu-body .vu-pay-qrcode :where(img, canvas) {
max-width: 100%;
@ -1076,31 +1034,6 @@ body.vu-body .vu-pay-address small { display: grid; gap: 6px; }
body.vu-body .vu-pay-address { margin: 16px 0; }
body.vu-body .vu-pay-address code { overflow-wrap: anywhere; }
body.vu-body .vu-notification { position: relative; }
body.vu-body .vu-notify-menu { display: none; }
body.vu-body .vu-notification.is-open .vu-notify-menu {
position: absolute;
top: calc(100% + 8px);
right: 0;
z-index: 50;
width: min(320px, calc(100vw - 32px));
max-height: 440px;
display: block;
overflow: auto;
padding: 16px;
background: var(--vu-panel);
border: 1px solid var(--vu-border);
border-radius: 12px;
box-shadow: var(--vu-shadow-lg);
}
body.vu-body .vu-notify-toggle {
min-height: 41px;
color: var(--vu-text-soft);
background: var(--vu-panel);
border: 1px solid var(--vu-border-strong);
border-radius: 9px;
}
/* Disabled account */
body.vu-body .vu-disabled-page {
min-height: 100vh;
@ -1418,10 +1351,9 @@ body.venix-auth .auth-modal-actions {
body.vu-body :where(.vu-card, .vu-hero-main,
.vu-edit-hero-main, .vu-invite-hero-main, .vu-pay-hero-main,
.vu-profile-hero-main, .vu-support-hero-main,
.vu-edit-summary, .vu-support-summary, .vu-stat, .vu-pay-balance,
.vu-edit-summary, .vu-support-summary, .vu-pay-balance,
.vu-profile-account, .vu-invite-balance) { padding: 21px; border-radius: 12px; }
body.vu-body :where(.vu-form-row, .vu-form-grid, .vu-invite-wallet-grid,
.vu-shop-features) { grid-template-columns: 1fr; }
body.vu-body :where(.vu-form-grid, .vu-shop-features) { grid-template-columns: 1fr; }
body.vu-body .vu-ga-setup { grid-template-columns: 1fr; }
body.vu-body .vu-support-ticket { align-items: flex-start; flex-direction: column; }
body.vu-body .vu-support-ticket-side { width: 100%; justify-content: space-between; }
@ -1451,10 +1383,9 @@ body.venix-auth .auth-modal-actions {
body.vu-body .vu-support-summary > div:last-child { border-bottom: 0; }
body.vu-body .vu-support-message-item { padding: 17px; }
body.vu-body .vu-table-footer { align-items: flex-start; flex-direction: column; }
body.vu-body .vu-modal,
body.vu-body .vu-pay-dialog,
body.venix-auth .auth-modal { align-items: flex-end; padding: 12px; }
body.vu-body :where(.vu-modal-panel, .vu-modal-card, .vu-pay-dialog-panel),
body.vu-body .vu-pay-dialog-panel,
body.venix-auth .auth-modal-panel {
max-height: 91vh;
padding: 25px 20px;
@ -1515,7 +1446,7 @@ body.venix-auth .auth-modal-actions {
@media print {
body.vu-body { color: #17283f !important; background: #fff !important; }
body.vu-body :where(.panel-sidebar, .panel-topbar, .vu-topbar, .vu-print-btn, .vu-modal) { display: none !important; }
body.vu-body :where(.panel-sidebar, .panel-topbar, .vu-topbar, .vu-print-btn) { display: none !important; }
body.vu-body .user-dashboard { display: block; }
body.vu-body .vu-main { max-width: none; padding: 0; }
body.vu-body .vu-invoice-card { padding: 0; border: 0; box-shadow: none; }
@ -1827,9 +1758,9 @@ body.vu-body .vu-compact-panel-heading {
}
body.vu-body .vu-panel-kicker { display: block; margin-bottom: 3px; color: var(--vu-brand); font-size: 8px; font-weight: 850; letter-spacing: .15em; }
body.vu-body .vu-compact-panel-heading h2 { margin: 0; color: var(--vu-text); font-size: 15px; line-height: 1.4; }
body.vu-body .vu-compact-panel-heading + :where(.vu-compact-form, .vu-compact-hint, .vu-compact-link-row, .vu-inline-empty) { margin-right: 14px; margin-left: 14px; }
body.vu-body .vu-compact-hint { margin: 0; color: var(--vu-muted); font-size: 10px; line-height: 1.55; }
body.vu-body .vu-compact-panel-heading + :where(.vu-compact-form, .vu-compact-link-row, .vu-inline-empty) { margin-right: 14px; margin-left: 14px; }
body.vu-body .vu-compact-panel-heading + .vu-compact-form { margin-top: 14px; margin-bottom: 14px; }
body.vu-body .vu-compact-panel-heading + .vu-compact-hint { margin-top: 12px; }
body.vu-body .vu-referral-hint { display: flex; align-items: center; gap: 7px; width: calc(100% - 28px); max-width: none; margin: 12px 14px 0; padding: 9px 10px; box-sizing: border-box; background: #f7fbfb; border-radius: 8px; line-height: 1.5; }
body.vu-body .vu-referral-hint i { flex: 0 0 auto; margin-top: 0; color: var(--vu-brand); font-size: 14px; line-height: 1; }
body.vu-body .vu-referral-hint span { min-width: 0; line-height: 1.5; }
@ -1839,10 +1770,6 @@ body.vu-body .vu-compact-grid { display: grid; grid-template-columns: repeat(2,
body.vu-body .vu-compact-field { display: grid; gap: 6px; min-width: 0; color: var(--vu-text-soft); font-size: 11px; font-weight: 750; }
body.vu-body .vu-compact-field .vu-input,
body.vu-body .vu-factor-line .vu-input { min-height: 40px; padding: 8px 11px; border-radius: 8px; font-size: 12px; }
body.vu-body .vu-compact-hint { margin: 0; color: var(--vu-muted); font-size: 10px; line-height: 1.55; }
/* The referral hint also carries .vu-compact-hint; keep its inset after the
shared compact-hint reset so it aligns with the link row below. */
body.vu-body .vu-compact-hint.vu-referral-hint { width: calc(100% - 28px); max-width: none; margin: 12px 14px 0; }
body.vu-body .vu-inline-status,
body.vu-body .vu-inline-empty {
display: flex;
@ -2035,19 +1962,6 @@ body.vu-body .vu-toast-close {
body.vu-body .vu-toast-close:hover { color: var(--vu-text); background: var(--vu-panel-soft); }
body.vu-body .vu-toast-actions { grid-column: 2 / -1; display: flex; justify-content: flex-end; gap: 7px; margin-top: 2px; }
body.vu-body .vu-toast-actions .vu-btn { min-width: 64px; min-height: 32px; padding: 6px 10px; font-size: 11px; }
body.vu-body .vu-modal {
align-items: flex-end;
justify-content: flex-end;
padding: 16px;
background: transparent;
backdrop-filter: none;
pointer-events: none;
}
body.vu-body .vu-modal .vu-modal-backdrop { display: none; }
body.vu-body .vu-modal.is-open { pointer-events: none; }
body.vu-body .vu-modal .vu-modal-panel { width: min(380px, calc(100vw - 32px)); max-height: min(70vh, 460px); padding: 18px; border-radius: 14px; pointer-events: auto; }
body.vu-body .vu-modal .vu-modal-actions { flex-direction: row; margin-top: 14px; }
body.vu-body .vu-modal .vu-modal-actions .vu-btn { width: auto; }
@keyframes vu-toast-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) {
body.vu-body .vu-toast { transition: none; }

@ -103,15 +103,14 @@ html.panel-announcements-open body { position: fixed; top: var(--panel-announcem
.panel-user-menu-options button i { width: 18px; color: #2b9da5; font-size: 17px; text-align: center; }
html.panel-account-open { overflow: hidden; overscroll-behavior: none; scroll-behavior: auto !important; }
html.panel-account-open body { position: fixed; top: var(--panel-account-scroll-top, 0px); left: 0; right: 0; width: 100%; overflow: hidden; }
.panel-account-drawer { position: fixed; inset: 0 0 0 auto; display: none; width: min(720px, 100%); max-width: 100%; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: #f4f7fb; color: #25384e; box-shadow: -14px 0 52px rgba(19,42,65,.18); overflow: hidden; }
.panel-account-drawer { position: fixed; inset: 0 0 0 auto; display: none; width: min(540px, 100%); max-width: 100%; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: #f4f7fb; color: #25384e; box-shadow: -14px 0 52px rgba(19,42,65,.18); overflow: hidden; }
.panel-account-drawer[open] { display: flex; flex-direction: column; }
.panel-account-drawer-header { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 22px 24px 18px; border-bottom: 1px solid #e1e9ef; background: #fff; }
.panel-account-drawer-header { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 18px; border-bottom: 1px solid #e1e9ef; background: #fff; }
.panel-account-drawer-header > div { min-width: 0; }
.panel-account-drawer-kicker { margin: 0 0 4px; color: #159da9; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.panel-account-drawer-header h2 { margin: 0 0 6px; color: #25384e; font-size: 20px; line-height: 1.45; font-weight: 800; }
.panel-account-drawer-header p:last-child { margin: 0; color: #7a8c9d; font-size: 12px; line-height: 1.7; }
.panel-account-drawer-close.button { flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 0; font-size: 22px; }
.panel-account-drawer-frame-wrap { min-height: 0; flex: 1 1 auto; position: relative; background: #f4f7fb; }
.panel-account-drawer-header h2 { margin: 0; color: #25384e; font-size: 18px; line-height: 1.3; font-weight: 800; }
#panel-account-drawer-description { display: none; }
.panel-account-drawer-close.button { flex: 0 0 40px; width: 40px; height: 40px; min-height: 40px; padding: 0; font-size: 20px; }
.panel-account-drawer-frame-wrap { min-height: 0; flex: 1 1 auto; position: relative; background: #f7f9fb; }
.panel-account-drawer-frames { position: relative; width: 100%; height: 100%; min-height: 0; }
.panel-account-drawer-frame-wrap[aria-busy="true"]::before { content: "正在加载…"; position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; color: #7d91a0; font-size: 12px; pointer-events: none; }
.panel-account-drawer-frame-wrap[aria-busy="false"]::before { display: none; }
@ -124,15 +123,6 @@ body.vu-embedded .dashboard > .main-area > .panel-topbar { display: none; }
body.vu-embedded .dashboard > .main-area { min-height: 100vh; }
body.vu-embedded .dashboard > .main-area > .vu-main { max-width: none; padding: 0; }
body.vu-embedded .dashboard > .main-area > .vu-main > .vu-topbar { margin: 0; }
/* The account drawer is a compact editor, not a second full dashboard. */
.panel-account-drawer { width: min(540px, 100%); }
.panel-account-drawer-header { align-items: center; padding: 12px 18px; }
.panel-account-drawer-kicker,
.panel-account-drawer-header p:last-child { display: none; }
.panel-account-drawer-header h2 { margin: 0; font-size: 18px; line-height: 1.3; }
.panel-account-drawer-close.button { width: 40px; height: 40px; min-height: 40px; flex-basis: 40px; font-size: 20px; }
.panel-account-drawer-frame-wrap { background: #f7f9fb; }
@media (max-width: 600px) {
.panel-user-menu-options { right: -5px; min-width: 170px; }
.panel-account-drawer { width: 100%; }

@ -1341,11 +1341,6 @@ html.admin-instance-detail-open body {
background: rgba(93, 216, 158, 0.18);
}
.admin-ticket-tabs a[aria-disabled="true"] {
cursor: wait;
opacity: 0.68;
}
.admin-ticket-title {
max-width: 520px;
color: #00081a;
@ -1411,12 +1406,6 @@ html.admin-instance-detail-open body {
font-size: 22px;
}
.admin-ticket-avatar img {
width: 100%;
height: 100%;
object-fit: cover;
}
.admin-ticket-bubble {
min-width: 0;
padding: 16px;
@ -1473,10 +1462,6 @@ html.admin-instance-detail-open body {
word-break: break-word;
}
.admin-ticket-content p:last-child {
margin-bottom: 0;
}
.admin-ticket-pagination {
margin-bottom: 14px;
}
@ -2005,16 +1990,6 @@ html.admin-instance-detail-open body {
gap: 10px;
}
.admin-user-create {
display: flex;
min-height: 100%;
flex-direction: column;
}
.admin-user-create .admin-modal-icon {
margin-bottom: 14px;
}
.admin-user-control-card .card-body {
display: grid;
gap: 12px;
@ -2127,27 +2102,6 @@ html.admin-instance-detail-open body {
word-break: break-all;
}
.admin-user-main,
.admin-user-meta{
display: grid;
gap: 3px;
}
.admin-user-main strong,
.admin-user-meta strong{
color: #00081a;
font-weight: 900;
}
.admin-user-main span,
.admin-user-meta span,
.admin-user-main small,
.admin-user-meta small {
color: #7c8ba0;
font-size: 12px;
font-weight: 800;
}
.admin-user-money {
color: #08785b;
font-weight: 900;
@ -2172,14 +2126,6 @@ html.admin-instance-detail-open body {
background: rgba(251, 44, 54, 0.14);
}
.admin-user-actions-cell {
display: inline-flex;
align-items: center;
justify-content: flex-end;
flex-wrap: wrap;
gap: 8px;
}
.admin-user-pagination {
display: flex;
align-items: center;

File diff suppressed because it is too large Load Diff

@ -1,10 +1,6 @@
(function () {
"use strict";
var modalState = {
resolver: null,
previousFocus: null
};
var toastSequence = 0;
var settings = window.VU_HOME || {};
@ -170,22 +166,6 @@
return promise;
}
function closeModal(result) {
var modal = qs("#vuModal");
if (!modal) return;
modal.classList.remove("is-open");
modal.setAttribute("aria-hidden", "true");
modal.setAttribute("hidden", "hidden");
document.body.classList.remove("vu-modal-lock");
if (modalState.previousFocus && modalState.previousFocus.focus) {
modalState.previousFocus.focus();
}
if (modalState.resolver) {
modalState.resolver(result);
modalState.resolver = null;
}
}
function openModal(options) {
var config = options || {};
return showToast(config);
@ -637,38 +617,6 @@
});
}
}
function bindModalActions() {
var modal = qs("#vuModal");
var confirm = qs("#vuModalConfirm");
var cancel = qs("#vuModalCancel");
qsa("[data-modal-close]").forEach(function (item) {
item.addEventListener("click", function () {
closeModal(false);
});
});
if (confirm) {
confirm.addEventListener("click", function () {
closeModal(true);
});
}
if (cancel) {
cancel.addEventListener("click", function () {
closeModal(false);
});
}
document.addEventListener("keydown", function (event) {
if (event.key === "Escape" && modal && modal.classList.contains("is-open")) {
closeModal(false);
}
});
}
function bindThemeToggle() {
var toggle = qs("#light-dark-mode");
applyTheme(currentTheme());
@ -678,41 +626,6 @@
});
}
function bindNotificationMenu() {
var wrapper = qs(".vu-notification");
var toggle = qs("[data-notify-toggle]");
var menu = qs("[data-notify-menu]");
if (!wrapper || !toggle || !menu) return;
function close() {
wrapper.classList.remove("is-open");
toggle.setAttribute("aria-expanded", "false");
menu.setAttribute("hidden", "hidden");
}
function open() {
wrapper.classList.add("is-open");
toggle.setAttribute("aria-expanded", "true");
menu.removeAttribute("hidden");
}
toggle.addEventListener("click", function (event) {
event.preventDefault();
event.stopPropagation();
if (wrapper.classList.contains("is-open")) close();
else open();
});
menu.addEventListener("click", function (event) {
event.stopPropagation();
});
document.addEventListener("click", close);
document.addEventListener("keydown", function (event) {
if (event.key === "Escape") close();
});
}
window.VuModal = {
alert: alertModal,
confirm: confirmModal
@ -720,11 +633,9 @@
document.addEventListener("DOMContentLoaded", function () {
bindThemeToggle();
bindModalActions();
bindCopyActions();
bindEditActions();
renderAuthenticatorQrCode();
bindInviteActions();
bindNotificationMenu();
});
})();

@ -1,2 +1,2 @@
{* Shared Venix CSS/JS cache key. Increment whenever a shared browser asset changes. *}
{assign var=venix_asset_version value='2026100305' scope='global'}
{assign var=venix_asset_version value='2026100306' scope='global'}

@ -1,7 +1,6 @@
<dialog class="panel-account-drawer" id="panel-account-drawer" aria-labelledby="panel-account-drawer-title" aria-describedby="panel-account-drawer-description">
<header class="panel-account-drawer-header">
<div>
<p class="panel-account-drawer-kicker">账户中心</p>
<h2 id="panel-account-drawer-title">账户设置</h2>
<p id="panel-account-drawer-description">管理双重认证和登录密码。</p>
</div>

@ -64,7 +64,7 @@
</div>
</section>
{include file='user/layout_footer.tpl'}
{include file='user/layout_modal.tpl'}
{include file='user/layout_toast.tpl'}
{include file='user/layout_scripts.tpl'}
</body>
</html>

@ -44,7 +44,7 @@
</div>
</section>
{include file='user/layout_footer.tpl'}
{include file='user/layout_modal.tpl'}
{include file='user/layout_toast.tpl'}
{include file='user/layout_scripts.tpl'}
</body>
</html>

@ -1,14 +0,0 @@
<div class="vu-toast-region" id="vuToastRegion" aria-live="polite" aria-atomic="false"></div>
<div class="vu-modal" id="vuModal" aria-hidden="true" hidden>
<div class="vu-modal-backdrop" data-modal-close></div>
<div class="vu-modal-panel" role="dialog" aria-modal="true" aria-labelledby="vuModalTitle" aria-describedby="vuModalBody">
<button class="vu-modal-close" type="button" data-modal-close aria-label="关闭"><i class="mdi mdi-close"></i></button>
<div class="vu-modal-mark" id="vuModalMark"><i class="mdi mdi-check"></i></div>
<h2 id="vuModalTitle">提示</h2>
<p id="vuModalBody">操作已完成。</p>
<div class="vu-modal-actions">
<button class="vu-btn vu-btn-ghost" type="button" id="vuModalCancel">取消</button>
<button class="vu-btn" type="button" id="vuModalConfirm">确定</button>
</div>
</div>
</div>

@ -0,0 +1 @@
<div class="vu-toast-region" id="vuToastRegion" aria-live="polite" aria-atomic="false"></div>

@ -50,7 +50,7 @@
<a class="vu-btn vu-btn-soft" id="vuPayOpen" href="#" target="_blank" rel="noopener"><i class="mdi mdi-open-in-new"></i><span id="vuPayOpenLabel">打开支付链接</span></a>
</div>
</div>
{include file='user/layout_modal.tpl'}
{include file='user/layout_toast.tpl'}
{include file='user/layout_scripts.tpl' vu_qrcode=1}
<script src="/theme/venix/js/recharge.js?v={$vu_asset_version}"></script>
</body>

@ -25,6 +25,6 @@
</section>
</div>
{include file='user/layout_footer.tpl'}
{include file='user/layout_modal.tpl'}
{include file='user/layout_toast.tpl'}
{include file='user/layout_scripts.tpl'}
</body></html>

@ -96,7 +96,7 @@
</section>
{include file='user/layout_footer.tpl'}
{include file='user/layout_modal.tpl'}
{include file='user/layout_toast.tpl'}
{include file='user/layout_scripts.tpl' vu_ticket_page=1}
</body>

@ -107,7 +107,7 @@
</section>
{include file='user/layout_footer.tpl'}
{include file='user/layout_modal.tpl'}
{include file='user/layout_toast.tpl'}
{include file='user/layout_scripts.tpl' vu_ticket_page=1}
</body>

@ -54,6 +54,10 @@ function fixture() {
document.querySelectorAll = selector => selector === '[data-announcements-open]' ? [trigger] : [];
document.querySelector = selector => document.querySelectorAll(selector)[0] ?? null;
const window = new Node(); window.scrollX = 0; window.scrollY = 125; window.scrollTo = () => {};
window.VenixDrawerMotion = {
openDrawerWithMotion(dialog) { dialog.showModal(); dialog.classList.add('is-drawer-visible'); return true; },
closeDrawerWithMotion(dialog) { dialog.classList.remove('is-drawer-visible'); dialog.close(); return Promise.resolve(true); },
};
const history = { state: null, replaceState(value) { this.state = value; } };
let now = 0; let timerId = 0;
const epoch = Date.UTC(2026, 8, 30, 6, 27, 20);

@ -0,0 +1,82 @@
<?php
$root = dirname(__DIR__);
$read = static function (string $path): string {
$contents = file_get_contents($path);
if (!is_string($contents)) {
throw new RuntimeException('Unable to read ' . $path);
}
return $contents;
};
$assert = static function (bool $condition, string $message): void {
if (!$condition) {
throw new RuntimeException($message);
}
};
$views = $root . '/resources/views/venix/user';
$userScript = $read($root . '/public/theme/venix/js/user-home.js');
$accountCss = $read($root . '/public/cloud/account.css');
$clientCss = $read($root . '/public/cloud/client.css');
$adminCss = $read($root . '/public/theme/venix/css/admin-home.css');
$assert(!is_file($root . '/public/theme/venix/css/user-home.css'),
'The retired user-home stylesheet must not remain in the release.');
$assert(!is_file($views . '/layout_modal.tpl') && is_file($views . '/layout_toast.tpl'),
'The retired modal partial must be replaced by the Toast-only partial.');
foreach (['edit.tpl', 'paytaro.tpl', 'ticket_view.tpl', 'ticket_create.tpl', 'invite.tpl', 'shop.tpl'] as $template) {
$source = $read($views . '/' . $template);
$assert(str_contains($source, "file='user/layout_toast.tpl'")
&& !str_contains($source, 'layout_modal.tpl'),
'User template does not use the Toast-only partial: ' . $template);
}
foreach (['modalState', 'function closeModal', 'function bindModalActions',
'function bindNotificationMenu', '.vu-notification', 'data-notify-toggle'] as $retiredToken) {
$assert(!str_contains($userScript, $retiredToken),
'Retired modal or notification runtime remains: ' . $retiredToken);
}
$assert(str_contains($userScript, 'window.VuModal = {')
&& str_contains($userScript, 'return showToast(config);'),
'The compatible VuModal API must continue to dispatch Toast messages.');
foreach (['.vu-notification', '.vu-notify-menu', '.vu-modal-actions',
'.vu-modal-backdrop', '.vu-modal-panel', '.vu-modal-card'] as $retiredSelector) {
$assert(!str_contains($accountCss, $retiredSelector),
'Retired account selector remains: ' . $retiredSelector);
}
$assert(str_contains($accountCss, 'body.vu-body .vu-pay-dialog')
&& str_contains($accountCss, 'body.vu-body .vu-modal-close')
&& str_contains($accountCss, 'body.vu-body .vu-modal-mark')
&& str_contains($accountCss, 'body.vu-body.vu-modal-lock'),
'The active payment dialog styles or body scroll lock were removed.');
$assert(!str_contains($accountCss, '.vu-compact-hint.vu-referral-hint'),
'The referral hint still relies on a duplicate specificity override.');
foreach (['.vu-ticket-actions', '.vu-ticket-grid', '.vu-support-message-content',
'.vu-support-meta', '.vu-ticket-tag.is-urgent', '.vu-stat {', '.vu-stat-grid',
'.vu-stats', '.vu-home-grid', '.vu-form,',
'.vu-form-row', '.vu-field'] as $retiredSelector) {
$assert(!str_contains($accountCss, $retiredSelector),
'Retired user or ticket selector remains: ' . $retiredSelector);
}
$assert(!str_contains($clientCss, 'width: min(720px, 100%)')
&& preg_match('/\.panel-account-drawer\s*\{[^}]*width:\s*min\(540px,\s*100%\)/s', $clientCss) === 1,
'The account drawer still has conflicting width declarations.');
$assert(!str_contains($clientCss, '.panel-account-drawer-kicker')
&& str_contains($clientCss, '#panel-account-drawer-description { display: none; }'),
'The compact account header still carries its retired kicker style.');
foreach (['.admin-ticket-avatar img', '.admin-ticket-content p:last-child',
'.admin-ticket-tabs a[aria-disabled="true"]',
'.admin-user-create {', '.admin-user-main', '.admin-user-meta',
'.admin-user-actions-cell'] as $retiredSelector) {
$assert(!str_contains($adminCss, $retiredSelector),
'Retired administrator selector remains: ' . $retiredSelector);
}
$assert(str_contains($adminCss, '.admin-ticket-avatar {')
&& str_contains($adminCss, '.admin-user-create-inline {'),
'An active administrator component was removed with the dead selectors.');
echo "Frontend residue cleanup checks passed.\n";
Loading…
Cancel
Save