feat: Add Test Page

This commit is contained in:
MystiPanda
2024-01-17 11:02:17 +08:00
parent b7d3b807d2
commit b6f4695bcd
13 changed files with 654 additions and 4 deletions

View File

@@ -109,17 +109,16 @@ class DelayManager {
}
formatDelay(delay: number) {
if (delay < 0) return "-";
if (delay <= 0) return "Error";
if (delay > 1e5) return "Error";
if (delay >= 10000) return "Timeout"; // 10s
return `${delay}`;
return `${delay} ms`;
}
formatDelayColor(delay: number) {
if (delay >= 10000) return "error.main";
/*if (delay <= 0) return "text.secondary";
if (delay <= 0) return "error.main";
if (delay > 500) return "warning.main";
if (delay > 100) return "text.secondary";*/
return "success.main";
}
}