fix: use err toast tone in new ops pages
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
faf576c151
commit
df049bd48d
@ -38,7 +38,7 @@ export default function DashboardPage() {
|
|||||||
const data = (await fetchJson(`/api/dashboard/jobs${q}`)) as { items?: JobRow[] };
|
const data = (await fetchJson(`/api/dashboard/jobs${q}`)) as { items?: JobRow[] };
|
||||||
setItems(data.items || []);
|
setItems(data.items || []);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
toast.push((e as Error).message, "error");
|
toast.push((e as Error).message, "err");
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
@ -56,7 +56,7 @@ export default function DashboardPage() {
|
|||||||
toast.push("已加入重试", "ok");
|
toast.push("已加入重试", "ok");
|
||||||
await load();
|
await load();
|
||||||
} catch (e) {
|
} 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");
|
toast.push("已从归档重传", "ok");
|
||||||
await load();
|
await load();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
toast.push((e as Error).message, "error");
|
toast.push((e as Error).message, "err");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,7 @@ export default function OpsMobilePage() {
|
|||||||
setHealth(h as Health);
|
setHealth(h as Health);
|
||||||
setMetrics(m as Metrics);
|
setMetrics(m as Metrics);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
toast.push((e as Error).message, "error");
|
toast.push((e as Error).message, "err");
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
@ -94,7 +94,7 @@ export default function OpsMobilePage() {
|
|||||||
await fetchJson("/api/notify/test", { method: "POST" });
|
await fetchJson("/api/notify/test", { method: "POST" });
|
||||||
toast.push("ntfy 测试已发送", "ok");
|
toast.push("ntfy 测试已发送", "ok");
|
||||||
} catch (e) {
|
} 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"
|
className="w-full rounded-xl border border-sky-500/30 bg-sky-500/10 py-3 text-sm text-sky-100"
|
||||||
|
|||||||
@ -37,7 +37,7 @@ export default function YoutubeOAuthHealthPage() {
|
|||||||
const data = (await fetchJson("/api/youtube/oauth-health")) as { channels?: ChannelRow[] };
|
const data = (await fetchJson("/api/youtube/oauth-health")) as { channels?: ChannelRow[] };
|
||||||
setRows(data.channels || []);
|
setRows(data.channels || []);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
toast.push((e as Error).message, "error");
|
toast.push((e as Error).message, "err");
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
@ -54,7 +54,7 @@ export default function YoutubeOAuthHealthPage() {
|
|||||||
toast.push("OAuth 探测完成", "ok");
|
toast.push("OAuth 探测完成", "ok");
|
||||||
await load();
|
await load();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
toast.push((e as Error).message, "error");
|
toast.push((e as Error).message, "err");
|
||||||
} finally {
|
} finally {
|
||||||
setProbing(false);
|
setProbing(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user