From 6902376bc2bf35d6bce7fcf9e44976a242fe673d Mon Sep 17 00:00:00 2001 From: toom1996 <23cm.cn@gmail.com> Date: Thu, 3 Sep 2026 00:32:17 +0800 Subject: [PATCH] update --- src/components/Item.astro | 164 ++++++++++++++++++++++++- src/components/StreetSnap.astro | 153 ++++++++++++++++++++++- src/i18n/config.ts | 9 -- src/i18n/dictionary.ts | 3 + src/lib/api.ts | 36 ++---- src/lib/favorites.ts | 101 +++++++++++++-- src/lib/history.ts | 2 +- src/lib/profile.ts | 34 ------ src/pages/cn/account.astro | 209 ++++++++++++++++++++------------ src/pages/en/account.astro | 209 ++++++++++++++++++++------------ src/styles/look-grid.css | 24 ---- 11 files changed, 685 insertions(+), 259 deletions(-) delete mode 100644 src/lib/profile.ts diff --git a/src/components/Item.astro b/src/components/Item.astro index ea0d238..0944c04 100644 --- a/src/components/Item.astro +++ b/src/components/Item.astro @@ -23,6 +23,7 @@ const images = (article?.images ?? []) .map((im) => ({ id: im.id, url: full(im.image || ""), + raw: im.image || "", // 相对路径:收藏快照存相对地址,不把宿主/端口写死进库 name: im.name || "", })) .filter((im) => im.url) @@ -53,6 +54,10 @@ if (article?.brand_id) {
{ @@ -79,8 +84,10 @@ if (article?.brand_id) { data-image-index={i} data-image-url={im.url} data-image-name={im.name} + data-fav-id={im.id} + data-fav-url={im.raw} @click={`openLb(${i})`} - class="bg-[#f2f2f2] cursor-zoom-in group" + class="relative bg-[#f2f2f2] cursor-zoom-in group" > + {/* 单图收藏:hover 显示,已收藏常驻实心 */} + + {im.name && (
{im.name} @@ -140,6 +162,18 @@ if (article?.brand_id) { x-text="`${lbIndex + 1} / ${imageCount}`" >
+ + + {im.name && (
{im.name} @@ -114,6 +136,18 @@ const displayTitle = (snap?.title || "").replace(/\t/g, " · ") x-text="`${lbIndex + 1} / ${imageCount}`" > + +