feat: "On this day" memories — photos from previous years
Add a Memories view that surfaces photos taken on the current date in previous years (like Google Photos / Immich). Only uses EXIF-sourced dates to avoid false matches from filesystem timestamps. - Backend: GET /api/v1/photos/memories returns groups by year, up to 12 photos each, filtered to non-discarded/non-hidden EXIF dates - Frontend: MemoriesView with year-grouped thumbnail grid - Sidebar: new "Memories" nav item with clock icon Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -328,6 +328,12 @@ export const photos = {
|
||||
getProxyUrl: (photoId: string) => {
|
||||
return `${API_BASE_URL}/photos/${photoId}/proxy`
|
||||
},
|
||||
|
||||
/** "On this day" memories — photos taken on this date in previous years. */
|
||||
memories: async (): Promise<MemoriesResponse> => {
|
||||
const response = await api.get('/photos/memories')
|
||||
return response.data
|
||||
},
|
||||
}
|
||||
|
||||
// Library API
|
||||
@@ -577,6 +583,31 @@ export interface DuplicateGroupsResponse {
|
||||
total_members: number
|
||||
}
|
||||
|
||||
// ── Memories ("On this day") ────────────────────────────────────────────
|
||||
|
||||
export interface MemoryPhoto {
|
||||
id: string
|
||||
filename: string
|
||||
taken_at: string
|
||||
thumb_small: string | null
|
||||
thumb_medium: string | null
|
||||
media_type: string
|
||||
width: number | null
|
||||
height: number | null
|
||||
rating: number
|
||||
}
|
||||
|
||||
export interface MemoryGroup {
|
||||
year: number
|
||||
years_ago: number
|
||||
photos: MemoryPhoto[]
|
||||
}
|
||||
|
||||
export interface MemoriesResponse {
|
||||
date: string
|
||||
memories: MemoryGroup[]
|
||||
}
|
||||
|
||||
export interface LibraryStats {
|
||||
all_photos: number
|
||||
rated: number
|
||||
|
||||
Reference in New Issue
Block a user