feat(web): favicon + toast feedback (polish)

Add a vinyl-record favicon (icon.svg) — fixes the favicon.ico 404 console
error. Lightweight toast system (ToastHost + toast()) fired on request, wanted
add, search, follow, and want actions so submits give explicit feedback.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan
2026-07-12 15:44:24 +02:00
parent c027945191
commit 92d1345503
8 changed files with 76 additions and 2 deletions
+9 -2
View File
@@ -3,6 +3,7 @@
import { useEffect, useState } from "react";
import { Modal } from "./modal";
import { CoverArt } from "./cover-art";
import { toast } from "./toast";
type Rel = {
rgMbid: string;
@@ -61,7 +62,10 @@ export function ArtistModal({
headers: { "content-type": "application/json" },
body: JSON.stringify({ mbid, name }),
});
if (res.ok || res.status === 409) setFollowed(true);
if (res.ok || res.status === 409) {
setFollowed(true);
toast(`Following ${name}`);
}
}
async function want(r: Rel) {
@@ -78,7 +82,10 @@ export function ArtistModal({
firstReleaseDate: r.firstReleaseDate,
}),
});
if (res.ok) setWanted((s) => new Set(s).add(r.rgMbid));
if (res.ok) {
setWanted((s) => new Set(s).add(r.rgMbid));
toast(`Added ${r.album}`);
}
}
return (