feat(checkin): open reference-parity details modal from signed buttons

- Rebuild checkin details modal HTML 1:1 with reference theme:
  colorful header c-blue, user card (points/level), daily reward
  card and 7-day continuous mini cards
- Signed entry buttons (header dropdown, user-card badge, user
  center) become clickable checkin-details-link modal triggers
  instead of disabled buttons
- Swap data-signin-btn to details link in place after successful
  signin (reference .initiate-checkin replacement behavior)
- Add aksrt-checkin-details-modal runtime shell (modal-mini 400px)
- Remove dead code: legacy lite modal, admin-ajax details handler,
  /signin/history route, signin calendar; rebuild public bundles
- Update contract tests to the new checkin modal contract
This commit is contained in:
2026-09-19 14:49:58 +08:00
parent c289016324
commit 4653128a18
15 changed files with 211 additions and 266 deletions
@@ -460,11 +460,14 @@ test('profile routes load versioned leaf styles and keep dialogs hidden initiall
assert.match(userCenterCreditsCss, /#panel-credits\.dashboard-panel\s*\{[^}]*background:\s*transparent;[^}]*box-shadow:\s*none;/);
assert.match(userCenterCreditsCss, /\.uc-asset-tabs\s*\{[^}]*background:\s*var\(--surface-1,\s*#fff\);[^}]*border:[^;}]+;[^}]*box-shadow:[^;}]+;/);
assert.doesNotMatch(profileCredits, /credits-signin\.php|data-aksrt-signin-calendar/);
// 签到日历只存在于签到弹窗(src/Credits/Signin.php + enhancements2.js),
// 用户中心里的孤儿渲染器已整包移除。
// 签到详情弹窗为参考主题 1:1 结构(src/Credits/Signin.php),日历已随
// 旧版 lite 弹窗一并移除;用户中心里的孤儿渲染器也已整包移除。
assert.equal(fs.existsSync(path.join(root, 'inc/helpers/user-center-renderers/credits-signin.php')), false);
assert.doesNotMatch(userCenterCreditsCss + read('assets/css/frontend/enhancements/components/custom-amount.css'), /uc-signin-calendar/);
assert.match(read('src/Credits/Signin.php'), /data-aksrt-signin-calendar/);
const signinModalHtml = read('src/Credits/Signin.php');
assert.match(signinModalHtml, /modal-colorful-header colorful-bg c-blue/);
assert.match(signinModalHtml, /checkin-mini-box/);
assert.doesNotMatch(signinModalHtml, /data-aksrt-signin-calendar/);
assert.match(profileOrders, /data-aksrt-orders-filter-panel hidden/);
assert.doesNotMatch(profileOrders, /\$_GET|add_query_arg|name="order_(?:status|type|number|page)"/);
assert.match(profileOrders, /data-aksrt-orders-filter-panel hidden[\s\S]*?aksrt-orders-page__status-filters[\s\S]*?aksrt-orders-page__type-filters/);
+1 -1
View File
@@ -253,7 +253,7 @@ test('balance center actions use direct fixed-id notyf flows', () => {
assert.match(headerUserbox, /data-signin-btn[\s\S]*?data-signin-label/);
assert.match(headerUserbox, /add_action\('wp_footer', 'aksrt_render_signin_captcha'\)/);
assert.match(headerUserbox, /data-signin-captcha[\s\S]*?aksrt_render_captcha\('signin'\)/);
assert.match(signinService, /aksrt-checkin-modal__btn[^>]+data-signin-btn/);
assert.match(signinService, /but c-blue ml10 p2-10 radius" data-signin-btn/);
assert.doesNotMatch(headerUserbox + signinService, /data-aksrt-checkin/);
assert.match(context, /'signin_enabled'\s*=>\s*\$signin_enabled/);
assert.match(context, /'signin_signed_today'\s*=>\s*\$signin_signed_today/);