feat: Memories tab — slideshow of photos on this day with ambient music

- New /api/memories/today endpoint queries photos by month+day (client
  sends its local date to avoid UTC offset issues in Docker)
- MemoriesView shows photos grouped by year with a "Play Memories"
  slideshow that crossfades between photos every 5 seconds
- Ambient music generated via Web Audio API — A-minor pad with slow
  vibrato shimmer and a pentatonic melody with convolver reverb
- Mute toggle, keyboard nav (← → Esc), progress dots, year badge
- fix: map popup images now use explicit px dimensions (100% was
  collapsing to 0 inside Leaflet's unsized popup content box)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 4.6 committed 2026-08-18 10:42:00 -04:00
1 parent dd6fa803eb
commit 0cba67e02e
5 files changed
+453 -2

No files matched your search

+16
View File
@@ -501,6 +501,22 @@ app.post('/api/admin/clear-dismissals', (_req, res) => {
res.sendStatus(204);
});
// ── Memories (photos on this day) ─────────────────────────────────────────────
app.get('/api/memories/today', (req, res) => {
// Client sends its local date as YYYY-MM-DD so Docker's UTC clock doesn't cause off-by-one
const date = req.query.date ?? new Date().toISOString().slice(0, 10);
const monthDay = date.slice(5); // "MM-DD"
const rows = db.raw.prepare(`
SELECT ${SELECT_COLS}
FROM photos p
WHERE p.date_taken IS NOT NULL
AND strftime('%m-%d', p.date_taken) = ?
ORDER BY p.date_taken ASC
`).all(monthDay);
res.json({ photos: rows.map(mapPhoto) });
});
// ── Filesystem browser ────────────────────────────────────────────────────────
app.get('/api/fs/browse', (req, res) => {