feat(web): Follow button + clickable artist in album modals
AlbumModal showed the artist name as static text — no way to follow the artist or jump to them. Adds a Follow affordance (todo #13): - AlbumInfo gains optional `artistMbid`. When present, the modal title links the artist name to /discover/artist/{mbid} and shows a Follow/Following button that reflects live follow state. - Follow state fetched via a new lightweight GET /api/artists?mbid= check (avoids pulling the full watched list + discography); Follow reuses POST /api/artists. Non-ok POST surfaces a toast (also chips at todo #14). - Wired artistMbid in the three discovery contexts where following is valuable: Discover, Discover artist preview, and Last.fm. Library/discography callers pass none (already-followed artists) so the button stays hidden — graceful. web 152 tests (the ?mbid= follow-state check asserted), tsc + build clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -175,6 +175,7 @@ export function PreviewClient({ mbid, initialName }: { mbid: string; initialName
|
||||
artist: name,
|
||||
year: open.firstReleaseDate?.slice(0, 4) ?? null,
|
||||
type: open.primaryType,
|
||||
artistMbid: mbid,
|
||||
}}
|
||||
status={chipFor(open)}
|
||||
actions={
|
||||
|
||||
Reference in New Issue
Block a user