#265 add grouping by day as well as month

This commit is contained in:
Alan Grainger
2026-07-17 14:27:51 +12:00
parent 4e7af0ab57
commit c2fcb81807
11 changed files with 180 additions and 22 deletions
+7 -1
View File
@@ -11,6 +11,9 @@
* `.location.enableAll`) or the field's own per-field flag is true.
* Strings are plain text (the client uses `textContent`, not `innerHTML`).
*/
export type GroupByDateMode = 'month' | 'day'
export interface GalleryExif {
dateTimeOriginal?: string // ISO date string; client formats with Intl.DateTimeFormat
fileName?: string
@@ -48,6 +51,9 @@ export interface GalleryItem {
height?: number
thumbhash?: string
fileCreatedAt?: string
// Photographer's local wall-clock timestamp, used for date grouping. See
// Asset.localDateTime. Falls back to fileCreatedAt when absent.
localDateTime?: string
exif?: GalleryExif
// True for album "grid" items whose exif / description / real download
// filename haven't been loaded yet. The client fetches them from the
@@ -98,6 +104,6 @@ export interface InitParams {
openItem?: number
lightboxConfig?: LightboxConfig
metadataConfig?: MetadataConfig
groupByDate?: boolean
groupByDate?: GroupByDateMode | false
metaBase?: string
}