Skip to content

Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.

fix(photo-item): 调整 Thumbhash 显示条件

Timothy Yine9549f4d2fde
diff --git a/app/components/map/ClusterPin.vue b/app/components/map/ClusterPin.vue
index fe30cec2..0705f146 100644
--- a/app/components/map/ClusterPin.vue
+++ b/app/components/map/ClusterPin.vue
@@ -40,8 +40,8 @@ const representativePhoto = computed(
<template>
<MapboxDefaultMarker
- :key="`cluster-${representativePhoto.id}`"
- :marker-id="`cluster-${representativePhoto.id}`"
+ :key="`marker-cluster-${representativePhoto.id}`"
+ :marker-id="`marker-cluster-${representativePhoto.id}`"
:lnglat="props.clusterPoint.geometry.coordinates"
:options="{}"
>
diff --git a/app/components/map/SinglePhotoPin.vue b/app/components/map/SinglePhotoPin.vue
index a48a71db..0981376f 100644
--- a/app/components/map/SinglePhotoPin.vue
+++ b/app/components/map/SinglePhotoPin.vue
@@ -20,18 +20,18 @@ const emit = defineEmits<{
}>()
const dayjs = useDayjs()
+const marker = computed(() => props.clusterPoint.properties.marker!)
const onClick = () => {
emit('click', props.clusterPoint)
}
-
-const marker = computed(() => props.clusterPoint.properties.marker!)
</script>
<template>
<MapboxDefaultMarker
- :key="`single-${marker.id}`"
- :marker-id="`single-${marker.id}`"
+ ref="markerRef"
+ :key="`marker-single-${marker.id}`"
+ :marker-id="`marker-single-${marker.id}`"
:lnglat="props.clusterPoint.geometry.coordinates"
:options="{}"
>
@@ -134,7 +134,7 @@ const marker = computed(() => props.clusterPoint.properties.marker!)
class="size-5"
/>
</MapGlassButton>
-
+
<!-- Single photo preview -->
<div class="relative h-36 overflow-hidden">
<ThumbImage
@@ -204,7 +204,9 @@ const marker = computed(() => props.clusterPoint.properties.marker!)
</div>
<!-- Latlng -->
<div
- v-if="marker.exif?.GPSLatitude || marker.exif?.GPSLongitude"
+ v-if="
+ marker.exif?.GPSLatitude || marker.exif?.GPSLongitude
+ "
class="flex items-center gap-1 text-xs text-muted"
>
<Icon
diff --git a/app/components/masonry/PhotoItem.client.vue b/app/components/masonry/PhotoItem.client.vue
index c366df91..d93572ae 100644
--- a/app/components/masonry/PhotoItem.client.vue
+++ b/app/components/masonry/PhotoItem.client.vue
@@ -460,7 +460,7 @@ onUnmounted(() => {
>
<!-- ThumbHash placeholder -->
<div
- v-if="isLoading && photo.thumbnailHash"
+ v-if="photo.thumbnailHash"
class="absolute inset-0 w-full h-full"
>
<ThumbHash