feat(viewer,ui04): E02 static fidelity — real photo fixtures, measured shell/photo/collapse specs, edge fade

- fixtures: 8 picsum-seeded real photos (mixed ratios); seedPhoto thumbBytes/browseBytes injection
- e2e E02 block: wrapper shell (195x280/radius/border/#10161E), photo strip (193w, ratio-height, 3px gap), collapse (44/44 hit, 24 visual, sole button), desktop+mobile screenshots
- EmbedStream: top/bottom 12px dark fade (0.12, §2.3 optional item)
- fix(admin): pre-existing eslint globals gap for ElNotification (template drift, blocks lint gate)

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-22 13:01:34 +08:00
parent 66d1eb3e9f
commit 1d1979f540
16 changed files with 159 additions and 10 deletions
+6 -2
View File
@@ -151,6 +151,10 @@ export interface SeedPhotoOptions {
width?: number;
height?: number;
publishedAt: Date;
/** UI-04:注入真实图片字节(如 e2e/fixtures 摄影样本)替代 sharp 色块;
* thumb/browse 各自可选,缺省仍按尺寸生成。bytes 与宽高须与元数据一致。 */
thumbBytes?: Buffer;
browseBytes?: Buffer;
}
/** 直种已发布照片:photos 行(ready/published,entityVersion=2 对齐发布事务)+
@@ -166,8 +170,8 @@ export async function seedPhoto(
const thumbWidth = Math.max(1, Math.round(width / 2));
const thumbHeight = Math.max(1, Math.round(height / 2));
const [thumb, browse] = await Promise.all([
makeJpeg(thumbWidth, thumbHeight),
makeJpeg(width, height),
options.thumbBytes ?? makeJpeg(thumbWidth, thumbHeight),
options.browseBytes ?? makeJpeg(width, height),
]);
await storage.put(variantKey(albumId, photoId, 'thumb'), thumb, 'image/jpeg');
await storage.put(variantKey(albumId, photoId, 'browse'), browse, 'image/jpeg');