delay status
This commit is contained in:
@@ -16,7 +16,7 @@ function fmtTime(iso: string): string {
|
||||
}
|
||||
|
||||
function scoreDisplay(m: Match): string {
|
||||
if (m.status === "SCHEDULED" || (m.homeScore == null && m.awayScore == null)) return "– : –";
|
||||
if (m.status === "SCHEDULED" || m.status === "POSTPONED" || (m.homeScore == null && m.awayScore == null)) return "– : –";
|
||||
const base = `${m.homeScore ?? 0} : ${m.awayScore ?? 0}`;
|
||||
if (m.homePenalty != null && m.awayPenalty != null) {
|
||||
return `${base} (${m.homePenalty}:${m.awayPenalty} i.E.)`;
|
||||
@@ -28,6 +28,7 @@ function statusLabel(m: Match): string {
|
||||
switch (m.status) {
|
||||
case "LIVE": case "IN_PLAY": return m.minute != null ? `${m.minute}'` : "Live";
|
||||
case "PAUSED": return "Halbzeit";
|
||||
case "POSTPONED": return "Verzögert";
|
||||
case "FINISHED": return "Beendet";
|
||||
default: return fmtTime(m.utcDate);
|
||||
}
|
||||
@@ -164,6 +165,16 @@ export default function KoFixtures({ teams, matches }: { teams: Team[]; matches:
|
||||
{live ? "LIVE" : "NÄCHSTES SPIEL"}
|
||||
</span>
|
||||
)}
|
||||
{m.status === "POSTPONED" && (
|
||||
<span style={{
|
||||
background: "var(--ink-faint)", color: "#fff",
|
||||
fontSize: 9, fontWeight: 700,
|
||||
padding: "1px 6px", borderRadius: 999,
|
||||
letterSpacing: "0.04em",
|
||||
}}>
|
||||
VERZÖGERT
|
||||
</span>
|
||||
)}
|
||||
{stageMap[m.stage] ?? m.stage} · Spiel {m.matchNumber || "—"}
|
||||
{city ? ` · ${city}` : ""}
|
||||
</span>
|
||||
|
||||
@@ -634,6 +634,7 @@ export async function fetchFifaScores(): Promise<{
|
||||
switch (fm.MatchStatus) {
|
||||
case 0: status = "FINISHED"; break;
|
||||
case 1: status = "SCHEDULED"; break;
|
||||
case 10: status = "POSTPONED"; break;
|
||||
default: status = "LIVE"; break;
|
||||
}
|
||||
scores.set(fm.MatchNumber, {
|
||||
|
||||
@@ -19,7 +19,7 @@ export interface Team {
|
||||
}
|
||||
|
||||
export type MatchStatus =
|
||||
| "SCHEDULED" | "LIVE" | "IN_PLAY" | "PAUSED" | "FINISHED";
|
||||
| "SCHEDULED" | "LIVE" | "IN_PLAY" | "PAUSED" | "FINISHED" | "POSTPONED";
|
||||
|
||||
export interface GoalEvent {
|
||||
scorer: string; // Torschützen-Name
|
||||
|
||||
Reference in New Issue
Block a user