fix(notifications): name the entity in action toasts

Eight confirmations stated a bare fact without saying what they acted on. Pass
the entity through the mutation variables and interpolate it: channel
unsubscribe/reset name the channel, whitelist/demo-whitelist adds name the
email, tag delete names the tag, and playlist revert/push name the playlist.
EN/HU/DE.
This commit is contained in:
npeter83 2026-06-26 00:32:17 +02:00
parent 557f2cef9c
commit 6c4c33f956
16 changed files with 45 additions and 43 deletions

View file

@ -242,10 +242,10 @@ function AdminInvites() {
});
const add = useMutation({
mutationFn: (email: string) => api.addInvite(email),
onSuccess: () => {
onSuccess: (_d, email) => {
setNewEmail("");
refresh();
notify({ level: "success", message: t("settings.invites.addedToWhitelist") });
notify({ level: "success", message: t("settings.invites.addedToWhitelist", { email }) });
},
onError: () => notify({ level: "error", message: t("settings.invites.addFailed") }),
});
@ -324,10 +324,10 @@ function AdminDemo() {
const add = useMutation({
mutationFn: (email: string) => api.addDemoWhitelist(email),
onSuccess: () => {
onSuccess: (_d, email) => {
setNewEmail("");
qc.invalidateQueries({ queryKey: ["demo-whitelist"] });
notify({ level: "success", message: t("settings.demo.added") });
notify({ level: "success", message: t("settings.demo.added", { email }) });
},
onError: () => notify({ level: "error", message: t("settings.demo.addFailed") }),
});