fix(ban): align user center ban notice with adjacent meta info

用户中心页头治理提示与相邻元信息(用户名/邮箱/城市)排版不一致:
- 高度不一致:原实现为 badg 胶囊 + 箭头作为 <a> 的内联兄弟节点,箭头
  游离在胶囊之外且按基线对齐,整行高度被 pill 撑高;
- 字号不一致:badg-sm 的 0.8em 使提示文字小于相邻项的 13px;
- 箭头位置:参考主题 zib_get_user_ban_info_link 的箭头位于按钮内部。

现复用 uc-header__meta-item(inline-flex 居中、12px 图标、13px 字号),
与相邻元信息完全同构:状态图标 + 状态文案(c-red/c-yellow)+ 内部箭头;
链接默认色经作用域规则回归行内墨色。契约测试锁定新结构,361 项全通过。
This commit is contained in:
2026-09-22 18:13:58 +08:00
parent 7f520803ff
commit f9bc0f69c4
3 changed files with 26 additions and 10 deletions
@@ -176,6 +176,13 @@ test('ban prompt surface mirrors the reference theme entry points', () => {
assert.match(userBanHelper, /function aksrt_get_user_ban_notice_html/)
assert.match(userBanHelper, /function aksrt_get_ban_appeal_page_url/)
assert.match(ucHeader, /aksrt_get_user_ban_notice_html/)
// 用户中心提示排版与相邻元信息一致:复用 uc-header__meta-item 结构,
// 不用 badg-sm(0.8em 破坏字号一致性),箭头置于提示内部。
const noticeFn = userBanHelper.slice(userBanHelper.indexOf('function aksrt_get_user_ban_notice_html'))
const noticeBody = noticeFn.slice(0, noticeFn.indexOf('\n}'))
assert.match(noticeBody, /\$class = 'uc-header__meta-item aksrt-user-ban-notice';/)
assert.ok(!noticeBody.includes('badg-sm'), 'user center notice must not use badg-sm (shrinks font vs meta row)')
assert.match(noticeBody, /fa-angle-right/)
// 评论拒绝态(参考主题 zib_get_user_ban_nocan_info)。
assert.match(userBanHelper, /function aksrt_get_user_ban_nocan_html/)
assert.match(commentsHelper, /aksrt_get_user_ban_nocan_html/)