From f8ff5b86c7bd21f4ce043204717036d0ea71a521 Mon Sep 17 00:00:00 2001 From: toom1996 <23cm.cn@gmail.com> Date: Fri, 25 Sep 2026 11:32:11 +0800 Subject: [PATCH] update --- .gitignore | 2 + src/components/DetailCountBadge.astro | 12 ++--- src/components/DetailGalleryView.astro | 15 +++--- src/components/GalleryLightbox.astro | 75 +++----------------------- src/components/RunwayLookCard.astro | 7 ++- src/components/StreetSnapCard.astro | 7 ++- src/layouts/Layout.astro | 2 +- src/lib/api.ts | 7 ++- src/lib/endpoints.ts | 2 +- src/lib/gallery.ts | 48 +---------------- src/lib/galleryDetail.ts | 60 ++++++++++----------- src/lib/i18n/index.ts | 15 +++--- src/lib/request.ts | 16 +++--- src/lib/ssg.ts | 3 +- src/lib/ssr.ts | 12 ++--- 15 files changed, 86 insertions(+), 197 deletions(-) diff --git a/.gitignore b/.gitignore index 6fc517e..f8f7e1c 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,5 @@ _tmp* # jetbrains setting folder .idea/ +.playwright-cli +.workbuddy \ No newline at end of file diff --git a/src/components/DetailCountBadge.astro b/src/components/DetailCountBadge.astro index 8208560..91618e3 100644 --- a/src/components/DetailCountBadge.astro +++ b/src/components/DetailCountBadge.astro @@ -3,20 +3,20 @@ // 纯主图(无细节图)不渲染。数量走 Alpine 的 detailCount()(响应式)—— 未登录取前 PREVIEW_LIMIT 张 // 的细节子树,登录后由 gallery:full 重建映射,两态共用同一条渲染路径。 // -// look:Alpine 表达式,表示该主图的 look_index。SSR 首屏传字面量(如 "3"), -// 客户端补拉的 x-for 里传表达式(如 "im.lookIndex")。 +// mainId:Alpine 表达式,表示该主图自身 id。SSR 首屏传字面量(如 "i0008CZYI"), +// 客户端补拉的 x-for 里传表达式(如 "im.id")。 interface Props { - look: string + mainId: string } -const { look } = Astro.props -const count = `detailCount(${look})` +const { mainId } = Astro.props +const count = `detailCount(${mainId})` --- {/* 副图数量角标(共享组件):有副图的主图左下角标「张数」,点它直接开副图灯箱 */} - + {showCaptions && im.name && ( @@ -264,7 +263,7 @@ const hasImages = previewImages.length > 0