Fix NE connect detail crash and dark pre text contrast.

This commit is contained in:
oliver 2026-08-04 19:31:27 +08:00
parent af29977878
commit a5d88f8a24
2 changed files with 10 additions and 1 deletions

View file

@ -557,7 +557,8 @@ th {
pre { pre {
white-space: pre-wrap; white-space: pre-wrap;
margin: 0; margin: 0;
background: #091425; background: #0f172a;
color: #e2e8f0;
border: 1px solid #223651; border: 1px solid #223651;
border-radius: 8px; border-radius: 8px;
padding: 10px; padding: 10px;

View file

@ -140,6 +140,14 @@ function connectStatusClass(status: string): string {
return "pt-list-status--unknown"; return "pt-list-status--unknown";
} }
function connectPillLevel(status: string): "up" | "down" | "unknown" | "warn" {
const s = String(status || "").toLowerCase();
if (s === "pass" || s === "ok") return "up";
if (s === "fail" || s === "error") return "down";
if (s === "testing") return "warn";
return "unknown";
}
export function NePage() { export function NePage() {
const { t } = useI18n(); const { t } = useI18n();
const { showOk, showError } = useToast(); const { showOk, showError } = useToast();