From ff521c9ad682e285232a436c0938e4ec2d2f7b50 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 Aug 2026 18:34:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/css/frontend/header-userbox.css | 2 ++ tests/widget-system/notification-preferences-contract.test.cjs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/assets/css/frontend/header-userbox.css b/assets/css/frontend/header-userbox.css index 420b1bae..d72559e7 100644 --- a/assets/css/frontend/header-userbox.css +++ b/assets/css/frontend/header-userbox.css @@ -212,7 +212,9 @@ } .aksrt-header-userbox .user-info > .abs-right { + top: 50%; right: 2px; + transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; diff --git a/tests/widget-system/notification-preferences-contract.test.cjs b/tests/widget-system/notification-preferences-contract.test.cjs index db5cf69e..b1fc0bd4 100644 --- a/tests/widget-system/notification-preferences-contract.test.cjs +++ b/tests/widget-system/notification-preferences-contract.test.cjs @@ -26,6 +26,7 @@ test('notification icon positions map to their four render locations', () => { const jsSchema = read('assets/admin/src/schema/sections/users/notifications.js'); const integration = read('src/Settings/Integration.php'); const header = read('inc/helpers/header/aksrt-header-navbar.php'); + const headerStyles = read('assets/css/frontend/header-userbox.css'); const userCenter = read('inc/helpers/aksrt-user-center.php'); const userHome = read('templates/parts/user/author-hero.php'); @@ -39,6 +40,7 @@ test('notification icon positions map to their four render locations', () => { assert.match(integration, /\['nav_menu', 'avatar_dropdown', 'user_center_header', 'user_home_header'\]/); assert.match(header, /in_array\('nav_menu', \$positions, true\)/); assert.match(header, /in_array\('avatar_dropdown', \$positions, true\)/); + assert.match(headerStyles, /\.aksrt-header-userbox \.user-info > \.abs-right \{[\s\S]*?top: 50%;[\s\S]*?transform: translateY\(-50%\);/); assert.match(header, /aksrt-nav-icon aksrt-nav-notification/); assert.match(header, /\$notification_but \. \$sign_but \. \$search_but/); assert.match(userCenter, /in_array\('user_center_header'/);