feat(viewer): refine visual details to match design reference

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-22 13:49:15 +08:00
parent 9dbdb0084e
commit 900ff2a74d
10 changed files with 162 additions and 132 deletions
+2 -1
View File
@@ -93,8 +93,9 @@ describe('activity page (Task 6)', () => {
expect(wrapper.find('.empty-notice').text()).toBe('照片即将上线');
// 无 banner 资产 → 不渲染 img;viewCount 未知(null)→ 浏览项显示「—」而非 0(UI-02 §4.1)。
// (参考稿:浏览项前置 ◉ Unicode 图标,属渲染内容的一部分。)
expect(wrapper.find('img.banner').exists()).toBe(false);
expect(wrapper.find('.view-count').text()).toBe('—');
expect(wrapper.find('.view-count').text()).toBe('◉—');
expect(document.title).toBe('2026 公司年会');
});
@@ -73,8 +73,8 @@ describe('album header info area (UI-02 V02)', () => {
expect(wrapper.find('h1.title').text()).toBe('2026 公司年会');
// pre-line:换行保留;文本插值(非 HTML 注入)。
expect(wrapper.find('.description').text()).toBe('年度盛会\n多行介绍');
// Intl.NumberFormat 分组 + 词条拼接(§4.1)。
expect(wrapper.find('.view-count').text()).toBe('1,286 次浏览');
// Intl.NumberFormat 分组 + 词条拼接(§4.1);参考稿:浏览项前置 ◉ Unicode 图标。
expect(wrapper.find('.view-count').text()).toBe('◉1,286 次浏览');
expect(wrapper.find('.meta').text()).toContain('大宴会厅 · 上海市浦东新区世纪大道 100 号');
// Asia/Shanghai(夹具时区):UTC 10-01 → 本地 10月1日。
expect(wrapper.find('.meta').text()).toContain('10月1日');
@@ -98,7 +98,7 @@ describe('album header info area (UI-02 V02)', () => {
expect(wrapper.find('img.banner').exists()).toBe(false);
expect(wrapper.find('.description').exists()).toBe(false);
expect(wrapper.findAll('.meta-item')).toHaveLength(2); // 浏览(—)+ 日期;地点整项省略
expect(wrapper.find('.view-count').text()).toBe('—');
expect(wrapper.find('.view-count').text()).toBe('◉—');
expect(wrapper.find('.categories').exists()).toBe(false);
});
@@ -59,7 +59,8 @@ describe('viewer shell tokens and embed isolation (UI-02 V01)', () => {
'--viewer-like-accent': '#FF667D',
'--viewer-font-family': "system-ui, -apple-system, 'Segoe UI', 'PingFang SC', sans-serif",
'--viewer-radius-img': '4px',
'--viewer-radius-pill': '20px',
'--viewer-radius-pill': '22px',
'--viewer-chip-bg': '#F5F7FA',
'--viewer-pad-info': '16px',
'--viewer-pad-photo': '4px',
'--viewer-touch-target': '44px',