feat: add recent plays history modal
Publish Metadata Agent Image / build-and-push-image (push) Successful in 1m23s
Publish Node Player Image / build-and-push-image (push) Successful in 37s
Publish Web Player Image / build-and-push-image (push) Successful in 1m49s

- GET /api/me/recent endpoint returning last 50 play events with track
  and artist info
- RecentPlays modal component with time-ago display
- "Recent plays" button in user dropdown menu
- Clicking a track in history starts playback

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ultradesu
2026-04-08 17:08:54 +01:00
parent 4fdd56dae4
commit 6b1aa6b5d5
10 changed files with 286 additions and 24 deletions
@@ -80,6 +80,19 @@ export async function getTrackInfo(trackSlug: string): Promise<TrackDetail | nul
return res?.data ?? null
}
export type RecentPlay = {
track_slug: string
track_title: string
artist_name: string
album_slug: string | null
played_at: string
}
export async function getRecentPlays(): Promise<RecentPlay[] | null> {
const res = await furumiApi.get<RecentPlay[]>('/me/recent').catch(() => null)
return res?.data ?? null
}
export async function recordPlay(trackSlug: string): Promise<void> {
await furumiApi.post(`/tracks/${trackSlug}/play`).catch(() => null)
}