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: 修复在没有照片时 HeaderItem 提示异常 (#11)

Timothy Yina2ad0f1734ef
diff --git a/app/components/masonry/HeaderItem.vue b/app/components/masonry/HeaderItem.vue
index 83d2ecfb..b2e1ee78 100644
--- a/app/components/masonry/HeaderItem.vue
+++ b/app/components/masonry/HeaderItem.vue
@@ -91,7 +91,10 @@ const totalSelectedFilters = computed(() => {
<div
class="text-neutral-600 dark:text-white/30 space-y-1 text-center"
>
- <p class="text-xs font-medium">
+ <p
+ v-if="stats?.total"
+ class="text-xs font-medium"
+ >
{{
$t('ui.stats.totalPhotosWithRange', {
range: dateRangeText,
@@ -99,6 +102,12 @@ const totalSelectedFilters = computed(() => {
})
}}
</p>
+ <p
+ v-else
+ class="text-xs font-medium"
+ >
+ {{ $t('ui.stats.noPhotosTip') }}
+ </p>
<p
v-if="config.public.APP_SLOGAN"
class="font-[Pacifico]"
diff --git a/i18n/locales/en.json b/i18n/locales/en.json
index 1853439c..330418b6 100644
--- a/i18n/locales/en.json
+++ b/i18n/locales/en.json
@@ -52,7 +52,8 @@
}
},
"stats": {
- "totalPhotosWithRange": "{range}, @:plural.photo total"
+ "totalPhotosWithRange": "{range}, @:plural.photo total",
+ "noPhotosTip": "Nno photos yet, upload some now!"
},
"livePhoto": "Live Photo"
},
diff --git a/i18n/locales/ja.json b/i18n/locales/ja.json
index 7fc76dbf..f7b7b0c7 100644
--- a/i18n/locales/ja.json
+++ b/i18n/locales/ja.json
@@ -52,7 +52,8 @@
}
},
"stats": {
- "totalPhotosWithRange": "{range}、@:plural.photo 合計"
+ "totalPhotosWithRange": "{range}、@:plural.photo 合計",
+ "noPhotosTip": "まだ写真はありません。アップロードしてください!"
},
"livePhoto": "Live Photo"
},
diff --git a/i18n/locales/zh-Hans.json b/i18n/locales/zh-Hans.json
index 4ec2c953..4a83a713 100644
--- a/i18n/locales/zh-Hans.json
+++ b/i18n/locales/zh-Hans.json
@@ -56,7 +56,8 @@
}
},
"stats": {
- "totalPhotosWithRange": "{range}, 共 @:plural.photo"
+ "totalPhotosWithRange": "{range}, 共 @:plural.photo",
+ "noPhotosTip": "还没有照片,快去上传一些吧!"
}
},
"minimap": {
diff --git a/i18n/locales/zh-Hant-HK.json b/i18n/locales/zh-Hant-HK.json
index 8225e4f8..d1a21afe 100644
--- a/i18n/locales/zh-Hant-HK.json
+++ b/i18n/locales/zh-Hant-HK.json
@@ -56,7 +56,8 @@
}
},
"stats": {
- "totalPhotosWithRange": "{range},共 @:plural.photo"
+ "totalPhotosWithRange": "{range},共 @:plural.photo",
+ "noPhotosTip": "還沒有照片,快去上傳一些吧!"
}
},
"minimap": {
diff --git a/i18n/locales/zh-Hant-TW.json b/i18n/locales/zh-Hant-TW.json
index 29d06b50..6d5df575 100644
--- a/i18n/locales/zh-Hant-TW.json
+++ b/i18n/locales/zh-Hant-TW.json
@@ -56,7 +56,8 @@
}
},
"stats": {
- "totalPhotosWithRange": "{range},共 @:plural.photo"
+ "totalPhotosWithRange": "{range},共 @:plural.photo",
+ "noPhotosTip": "還沒有照片,快去上傳一些吧!"
}
},
"minimap": {