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(photos): add sort by upload date options
Ahmet Ömer8968f6bf2e38
diff --git a/app/composables/usePhotoSort.ts b/app/composables/usePhotoSort.tsindex f64439af..bd22da21 100644--- a/app/composables/usePhotoSort.ts+++ b/app/composables/usePhotoSort.ts@@ -31,6 +31,22 @@ const globalSortState = ref<SortState>({photo.dateTaken ? new Date(photo.dateTaken).getTime() : 0,order: 'asc',},+ {+ key: 'lastModified-desc',+ labelI18n: 'ui.action.sort.options.lastModifiedDesc',+ icon: 'tabler:sort-descending',+ value: (photo: Photo) =>+ photo.lastModified ? new Date(photo.lastModified).getTime() : 0,+ order: 'desc',+ },+ {+ key: 'lastModified-asc',+ labelI18n: 'ui.action.sort.options.lastModifiedAsc',+ icon: 'tabler:sort-ascending',+ value: (photo: Photo) =>+ photo.lastModified ? new Date(photo.lastModified).getTime() : 0,+ order: 'asc',+ },{key: 'fileSize-asc',labelI18n: 'ui.action.sort.options.fileSizeAsc',diff --git a/i18n/locales/en.json b/i18n/locales/en.jsonindex b3080285..132bc8db 100644--- a/i18n/locales/en.json+++ b/i18n/locales/en.json@@ -34,6 +34,8 @@"options": {"dateTakenDesc": "Date Taken (Newest First)","dateTakenAsc": "Date Taken (Oldest First)",+ "lastModifiedDesc": "Date Uploaded (Newest First)",+ "lastModifiedAsc": "Date Uploaded (Oldest First)","fileSizeAsc": "File Size (Ascending)","fileSizeDesc": "File Size (Descending)","titleAsc": "Title (Ascending)",diff --git a/i18n/locales/ja.json b/i18n/locales/ja.jsonindex b8a494f0..53d77af3 100644--- a/i18n/locales/ja.json+++ b/i18n/locales/ja.json@@ -34,6 +34,8 @@"options": {"dateTakenDesc": "撮影日(新しい順)","dateTakenAsc": "撮影日(古い順)",+ "lastModifiedDesc": "アップロード日(新しい順)",+ "lastModifiedAsc": "アップロード日(古い順)","fileSizeAsc": "ファイルサイズ(昇順)","fileSizeDesc": "ファイルサイズ(降順)","titleAsc": "タイトル(昇順)",diff --git a/i18n/locales/ru.json b/i18n/locales/ru.jsonindex 72861ba1..c14dc998 100644--- a/i18n/locales/ru.json+++ b/i18n/locales/ru.json@@ -34,6 +34,8 @@"options": {"dateTakenDesc": "Дате съёмки (сначала новые)","dateTakenAsc": "Дате съёмки (сначала старые)",+ "lastModifiedDesc": "Дате загрузки (сначала новые)",+ "lastModifiedAsc": "Дате загрузки (сначала старые)","fileSizeAsc": "Размеру файла (по возрастанию)","fileSizeDesc": "Размеру файла (по убыванию)","titleAsc": "Названию (по возрастанию)",diff --git a/i18n/locales/zh-Hans.json b/i18n/locales/zh-Hans.jsonindex 550ff9dc..e612e21f 100644--- a/i18n/locales/zh-Hans.json+++ b/i18n/locales/zh-Hans.json@@ -47,6 +47,8 @@"options": {"dateTakenAsc": "日期(最旧的在前)","dateTakenDesc": "日期(最新的在前)",+ "lastModifiedAsc": "上传日期(最旧的在前)",+ "lastModifiedDesc": "上传日期(最新的在前)","fileSizeAsc": "文件大小(升序)","fileSizeDesc": "文件大小(降序)","titleAsc": "标题(A-Z)",diff --git a/i18n/locales/zh-Hant-HK.json b/i18n/locales/zh-Hant-HK.jsonindex 658f5b3f..24e7b5d5 100644--- a/i18n/locales/zh-Hant-HK.json+++ b/i18n/locales/zh-Hant-HK.json@@ -47,6 +47,8 @@"options": {"dateTakenAsc": "日期(最舊的在前)","dateTakenDesc": "日期(最新的在前)",+ "lastModifiedAsc": "上傳日期(最舊的在前)",+ "lastModifiedDesc": "上傳日期(最新的在前)","fileSizeAsc": "檔案大小(升冪)","fileSizeDesc": "檔案大小(降冪)","titleAsc": "標題(A-Z)",diff --git a/i18n/locales/zh-Hant-TW.json b/i18n/locales/zh-Hant-TW.jsonindex 3b759dde..4a5945a7 100644--- a/i18n/locales/zh-Hant-TW.json+++ b/i18n/locales/zh-Hant-TW.json@@ -47,6 +47,8 @@"options": {"dateTakenAsc": "日期(最舊的在前)","dateTakenDesc": "日期(最新的在前)",+ "lastModifiedAsc": "上傳日期(最舊的在前)",+ "lastModifiedDesc": "上傳日期(最新的在前)","fileSizeAsc": "檔案大小(升冪)","fileSizeDesc": "檔案大小(降冪)","titleAsc": "標題(A-Z)",