refactor: remove retired frontend residues
parent
5e71f81c5a
commit
fe43fdbf9c
File diff suppressed because it is too large
Load Diff
@ -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,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>
|
||||
@ -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…
Reference in New Issue