fix: use err toast tone in new ops pages

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
eric 2026-08-23 08:11:17 -05:00
parent faf576c151
commit df049bd48d
3 changed files with 7 additions and 7 deletions

View File

@ -38,7 +38,7 @@ export default function DashboardPage() {
const data = (await fetchJson(`/api/dashboard/jobs${q}`)) as { items?: JobRow[] };
setItems(data.items || []);
} catch (e) {
toast.push((e as Error).message, "error");
toast.push((e as Error).message, "err");
} finally {
setLoading(false);
}
@ -56,7 +56,7 @@ export default function DashboardPage() {
toast.push("已加入重试", "ok");
await load();
} catch (e) {
toast.push((e as Error).message, "error");
toast.push((e as Error).message, "err");
}
}
@ -66,7 +66,7 @@ export default function DashboardPage() {
toast.push("已从归档重传", "ok");
await load();
} catch (e) {
toast.push((e as Error).message, "error");
toast.push((e as Error).message, "err");
}
}

View File

@ -39,7 +39,7 @@ export default function OpsMobilePage() {
setHealth(h as Health);
setMetrics(m as Metrics);
} catch (e) {
toast.push((e as Error).message, "error");
toast.push((e as Error).message, "err");
} finally {
setLoading(false);
}
@ -94,7 +94,7 @@ export default function OpsMobilePage() {
await fetchJson("/api/notify/test", { method: "POST" });
toast.push("ntfy 测试已发送", "ok");
} catch (e) {
toast.push((e as Error).message, "error");
toast.push((e as Error).message, "err");
}
}}
className="w-full rounded-xl border border-sky-500/30 bg-sky-500/10 py-3 text-sm text-sky-100"

View File

@ -37,7 +37,7 @@ export default function YoutubeOAuthHealthPage() {
const data = (await fetchJson("/api/youtube/oauth-health")) as { channels?: ChannelRow[] };
setRows(data.channels || []);
} catch (e) {
toast.push((e as Error).message, "error");
toast.push((e as Error).message, "err");
} finally {
setLoading(false);
}
@ -54,7 +54,7 @@ export default function YoutubeOAuthHealthPage() {
toast.push("OAuth 探测完成", "ok");
await load();
} catch (e) {
toast.push((e as Error).message, "error");
toast.push((e as Error).message, "err");
} finally {
setProbing(false);
}