Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.
TypeScript albumsexif-extractiongeocodinglive-photomotion-photophoto-galleryphoto-sharingwebgl-viewer
feat(albums): warn about album password limits on non-local storage
Timothy Yin7396b653f1d5
diff --git a/app/components/AlbumProtectionWarning.vue b/app/components/AlbumProtectionWarning.vuenew file mode 100644index 00000000..ac45db47--- /dev/null+++ b/app/components/AlbumProtectionWarning.vue@@ -0,0 +1,9 @@+<template>+ <UAlert+ color="info"+ variant="subtle"+ icon="tabler:info-circle"+ :title="$t('albumProtectionWarning.title')"+ :description="$t('albumProtectionWarning.description')"+ />+</template>diff --git a/app/pages/dashboard/albums.vue b/app/pages/dashboard/albums.vueindex 73a5a929..0141f230 100644--- a/app/pages/dashboard/albums.vue+++ b/app/pages/dashboard/albums.vue@@ -30,6 +30,22 @@ interface AlbumFormState {passwordEnabled: boolean}+const { data: currentStorageProvider } = await useFetch<{+ namespace: string+ key: string+ value: SettingValue+}>('/api/system/settings/storage/provider')+const { data: availableStorage } = await useFetch<SettingStorageProvider[]>(+ '/api/system/settings/storage-config',+)++const isCurrentStorageNonLocal = computed(() => {+ const provider = availableStorage.value?.find(+ (item) => item.id === currentStorageProvider.value?.value,+ )+ return Boolean(provider && provider.provider !== 'local')+})+const albums = ref<AlbumItem[]>([])const isLoadingAlbums = ref(false)const allPhotos = ref<Photo[]>([])@@ -801,6 +817,9 @@ const columns = computed<any[]>(() => ["/></UFormField>+ <AlbumProtectionWarning+ v-if="formData.passwordEnabled && isCurrentStorageNonLocal"+ /><UFormFieldv-if="formData.passwordEnabled":label="$t('dashboard.albums.form.password')"diff --git a/app/pages/dashboard/settings/storage.vue b/app/pages/dashboard/settings/storage.vueindex 1d307bd0..85b3ebab 100644--- a/app/pages/dashboard/settings/storage.vue+++ b/app/pages/dashboard/settings/storage.vue@@ -560,6 +560,10 @@ const confirmStorageDelete = async () => {<UInput v-model="storageConfigState.name" /></UFormField>+ <AlbumProtectionWarning+ v-if="storageConfigState.provider !== 'local'"+ />+<USeparator /><AutoFormdiff --git a/i18n/locales/en.json b/i18n/locales/en.jsonindex 89b6a88d..8124a42a 100644--- a/i18n/locales/en.json+++ b/i18n/locales/en.json@@ -1,4 +1,8 @@{+ "albumProtectionWarning": {+ "title": "Album password protection limitations",+ "description": "Album passwords cannot protect public S3, OpenList or CDN photo URLs: anyone with a direct link can still access the file without the password. Use local storage for protected albums. Changing the password or default storage does not revoke existing links or cached copies. If photos were already public, disable public access at the storage/CDN, clear caches and change object URLs."+ },"plural": {"photo": "no photos | one photo | {count} photos"},diff --git a/i18n/locales/ja.json b/i18n/locales/ja.jsonindex 1c5d36d0..0513358f 100644--- a/i18n/locales/ja.json+++ b/i18n/locales/ja.json@@ -1,4 +1,8 @@{+ "albumProtectionWarning": {+ "title": "アルバムのパスワード保護の制限",+ "description": "アルバムのパスワードでは、S3、OpenList、CDN の公開写真 URL を保護できません。直接リンクを持つ人は、パスワードなしでファイルにアクセスできます。保護するアルバムにはローカルストレージを使用してください。パスワードやデフォルトのストレージを変更しても、既存のリンクやキャッシュは無効になりません。すでに公開した写真は、ストレージ/CDN 側で公開アクセスを無効にし、キャッシュを削除してオブジェクト URL を変更する必要があります。"+ },"plural": {"photo": "写真がありません | 写真 {count} 枚"},diff --git a/i18n/locales/ru.json b/i18n/locales/ru.jsonindex 070b4533..2d4452db 100644--- a/i18n/locales/ru.json+++ b/i18n/locales/ru.json@@ -1,4 +1,8 @@{+ "albumProtectionWarning": {+ "title": "Ограничения защиты альбомов паролем",+ "description": "Пароль альбома не защищает публичные ссылки на фотографии в S3, OpenList или CDN: любой, у кого есть прямая ссылка, может открыть файл без пароля. Для защищённых альбомов используйте локальное хранилище. Изменение пароля или хранилища по умолчанию не отзывает существующие ссылки и кэшированные копии. Если фотографии уже были публичными, отключите публичный доступ в хранилище/CDN, очистите кэш и измените адреса объектов."+ },"plural": {"photo": "нет фото | одно фото | {count} фото"},diff --git a/i18n/locales/zh-Hans.json b/i18n/locales/zh-Hans.jsonindex d124dd8b..75cb98a1 100644--- a/i18n/locales/zh-Hans.json+++ b/i18n/locales/zh-Hans.json@@ -1,4 +1,8 @@{+ "albumProtectionWarning": {+ "title": "相簿密码保护的限制",+ "description": "相簿密码无法保护 S3、OpenList 或 CDN 的公开照片直链:持有直链的人仍可无需密码访问文件。受保护相簿请使用本地存储。修改密码或默认存储不会撤销已有直链或缓存副本。若照片已经公开,还需在存储/CDN 侧关闭公开访问、清理缓存并更换对象地址。"+ },"map": {"setupNotice": {"title": "地图服务尚未配置",diff --git a/i18n/locales/zh-Hant-HK.json b/i18n/locales/zh-Hant-HK.jsonindex 190da9fe..1c8e7348 100644--- a/i18n/locales/zh-Hant-HK.json+++ b/i18n/locales/zh-Hant-HK.json@@ -1,4 +1,8 @@{+ "albumProtectionWarning": {+ "title": "相簿密碼保護的限制",+ "description": "相簿密碼無法保護 S3、OpenList 或 CDN 的公開相片直連網址:持有網址的人仍可無需密碼存取檔案。受保護相簿請使用本機儲存。修改密碼或預設儲存不會撤銷既有網址或快取副本。若相片已經公開,還需在儲存/CDN 端關閉公開存取、清除快取並更換物件網址。"+ },"map": {"setupNotice": {"title": "地圖服務尚未設定",diff --git a/i18n/locales/zh-Hant-TW.json b/i18n/locales/zh-Hant-TW.jsonindex 4bb8ad7d..d83ce29a 100644--- a/i18n/locales/zh-Hant-TW.json+++ b/i18n/locales/zh-Hant-TW.json@@ -1,4 +1,8 @@{+ "albumProtectionWarning": {+ "title": "相簿密碼保護的限制",+ "description": "相簿密碼無法保護 S3、OpenList 或 CDN 的公開相片直連網址:持有網址的人仍可無需密碼存取檔案。受保護相簿請使用本機儲存。修改密碼或預設儲存不會撤銷既有網址或快取副本。若相片已經公開,還需在儲存/CDN 端關閉公開存取、清除快取並更換物件網址。"+ },"map": {"setupNotice": {"title": "地圖服務尚未設定",