fix(notifications): use the success level for success toasts
The 'Synced N playlists' and 'View link copied' toasts used the default info level, which renders in the accent colour and read as an error/alert. Mark them level:success so they show the green check — clearly positive and theme-independent.
This commit is contained in:
parent
12339009b5
commit
f1495594af
2 changed files with 2 additions and 2 deletions
|
|
@ -172,7 +172,7 @@ export default function Playlists() {
|
||||||
const r = await api.syncYoutubePlaylists();
|
const r = await api.syncYoutubePlaylists();
|
||||||
qc.invalidateQueries({ queryKey: ["playlists"] });
|
qc.invalidateQueries({ queryKey: ["playlists"] });
|
||||||
qc.invalidateQueries({ queryKey: ["playlist"] });
|
qc.invalidateQueries({ queryKey: ["playlist"] });
|
||||||
notify({ message: t("playlists.syncedToast", { count: r.synced }) });
|
notify({ level: "success", message: t("playlists.syncedToast", { count: r.synced }) });
|
||||||
} catch {
|
} catch {
|
||||||
notify({ level: "warning", message: t("playlists.syncFailed") });
|
notify({ level: "warning", message: t("playlists.syncFailed") });
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,7 @@ export default function Sidebar({
|
||||||
async function shareView() {
|
async function shareView() {
|
||||||
try {
|
try {
|
||||||
await navigator.clipboard.writeText(shareUrl(filters));
|
await navigator.clipboard.writeText(shareUrl(filters));
|
||||||
notify({ message: t("sidebar.shareCopied") });
|
notify({ level: "success", message: t("sidebar.shareCopied") });
|
||||||
} catch {
|
} catch {
|
||||||
notify({ level: "warning", message: t("sidebar.shareFailed") });
|
notify({ level: "warning", message: t("sidebar.shareFailed") });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue