修复了一些问题
This commit is contained in:
@@ -332,13 +332,14 @@
|
||||
|
||||
.aksrt-header-payvip__active {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 2px !important;
|
||||
gap: 8px !important;
|
||||
width: 100%;
|
||||
min-height: 42px;
|
||||
padding: 7px 10px !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.aksrt-header-payvip__level {
|
||||
@@ -353,7 +354,7 @@
|
||||
}
|
||||
|
||||
.aksrt-header-payvip__exp {
|
||||
display: block;
|
||||
display: inline;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
@@ -364,6 +365,7 @@
|
||||
font-weight: 400;
|
||||
line-height: 1.3;
|
||||
opacity: .9;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Navigation links are globally capped at 50px. Account actions are taller
|
||||
|
||||
@@ -139,7 +139,10 @@ if (!function_exists('aksrt_header_payvip_bar')) :
|
||||
$exp_label = '';
|
||||
if (function_exists('aksrt_get_vip_info')) {
|
||||
$info = aksrt_get_vip_info($user_id);
|
||||
$exp_label = (string) ($info['expires_label'] ?? '');
|
||||
$expires = max(0, (int) ($info['expires'] ?? 0));
|
||||
$exp_label = $expires > 0
|
||||
? sprintf(__('到期时间:%s', 'aksrt'), wp_date('Y年m月d日', $expires))
|
||||
: (string) ($info['expires_label'] ?? '');
|
||||
}
|
||||
$html = '<div class="mt10 em09 aksrt-header-payvip is-vip">';
|
||||
$html .= '<span class="radius4 payvip-icon btn-block text-center vipbg-v2 level-' . (int) $level . ' aksrt-header-payvip__active">';
|
||||
|
||||
@@ -19,6 +19,7 @@ const headerMenuButtons = read('inc/helpers/aksrt-header-menu-buttons.php')
|
||||
const frontendRenderer = read('src/WidgetSystem/FrontendRenderer.php')
|
||||
const userRenderer = read('src/WidgetSystem/Renderers/UserRenderer.php')
|
||||
const headerNavbar = read('inc/helpers/header/aksrt-header-navbar.php')
|
||||
const headerUserbox = read('inc/helpers/aksrt-header-userbox.php')
|
||||
const headerSearch = read('inc/helpers/header/aksrt-header-menu-search.php')
|
||||
const headerCss = read('assets/css/frontend/header-userbox.css')
|
||||
|
||||
@@ -244,6 +245,13 @@ test('header user-card publish controls are removed from configuration and runti
|
||||
assert.match(headerNavbar, /esc_html__\('发布内容', 'aksrt'\)/)
|
||||
})
|
||||
|
||||
test('header user-card membership stays on one row with a date-only expiry', () => {
|
||||
assert.match(headerUserbox, /wp_date\('Y年m月d日', \$expires\)/)
|
||||
assert.doesNotMatch(headerUserbox, /wp_date\('Y-m-d H:i', \$expires\)/)
|
||||
assert.match(headerCss, /\.aksrt-header-payvip__active\s*\{[^}]*flex-direction:\s*row;[^}]*gap:\s*8px !important;[^}]*white-space:\s*nowrap;/s)
|
||||
assert.match(headerCss, /\.aksrt-header-payvip__exp\s*\{[^}]*display:\s*inline;[^}]*white-space:\s*nowrap;/s)
|
||||
})
|
||||
|
||||
test('save contract rejects invalid input and round-trips canonical nested values', () => {
|
||||
const result = spawnSync(process.env.PHP_BINARY || 'php', [path.join(__dirname, 'page-display-save-harness.php')], {
|
||||
cwd: root,
|
||||
|
||||
Reference in New Issue
Block a user