From bafa8ab908af181113b2f6fc7a2dd02e375d0f1c Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Mon, 27 Apr 2026 08:32:50 +0300 Subject: [PATCH] Show results tab even for ongoing --- .../match-page/MatchTimeline.module.css | 17 +++++++++++++- app/components/match-page/MatchTimeline.tsx | 23 ++++++++++++++++--- .../components/SendouQMatchTabs.tsx | 8 ++++++- .../components/TournamentMatchTabs.tsx | 9 ++++++++ locales/da/q.json | 1 + locales/de/q.json | 1 + locales/en/q.json | 1 + locales/es-ES/q.json | 1 + locales/es-US/q.json | 1 + locales/fr-CA/q.json | 1 + locales/fr-EU/q.json | 1 + locales/he/q.json | 1 + locales/it/q.json | 1 + locales/ja/q.json | 1 + locales/ko/q.json | 1 + locales/nl/q.json | 1 + locales/pl/q.json | 1 + locales/pt-BR/q.json | 1 + locales/ru/q.json | 1 + locales/zh/q.json | 1 + 20 files changed, 68 insertions(+), 5 deletions(-) diff --git a/app/components/match-page/MatchTimeline.module.css b/app/components/match-page/MatchTimeline.module.css index c827aeab2..1e2ab06ed 100644 --- a/app/components/match-page/MatchTimeline.module.css +++ b/app/components/match-page/MatchTimeline.module.css @@ -39,9 +39,24 @@ } .headerScore { + display: flex; + flex-direction: column; + align-items: center; + text-align: center; +} + +.headerScoreValue { font-size: var(--font-xl); font-weight: var(--weight-extra); - text-align: center; + line-height: 1; +} + +.headerScoreLive { + margin-top: var(--s-1); + font-size: var(--font-3xs); + font-weight: var(--weight-bold); + letter-spacing: 0.1em; + color: var(--color-error); } .mapEvent { diff --git a/app/components/match-page/MatchTimeline.tsx b/app/components/match-page/MatchTimeline.tsx index ba3fdab91..28c7b90bc 100644 --- a/app/components/match-page/MatchTimeline.tsx +++ b/app/components/match-page/MatchTimeline.tsx @@ -70,6 +70,8 @@ export interface MatchTimelineProps { spChanges?: TimelineSpChanges; /** When true, render only the team + score header (no per-map rows or SP section). */ compact?: boolean; + /** When true, the match is still in progress; renders a small LIVE label under the score. */ + isOngoing?: boolean; } export function MatchTimeline({ @@ -78,10 +80,16 @@ export function MatchTimeline({ maps, spChanges, compact = false, + isOngoing = false, }: MatchTimelineProps) { return (
- + {compact ? null : maps.map((map, i) => { @@ -110,7 +118,9 @@ function TimelineHeader({ teams, score, maps, -}: Pick) { + isOngoing, +}: Pick) { + const { t } = useTranslation(["q"]); const initialRosters = maps[0]?.rosters; return ( @@ -133,7 +143,14 @@ function TimelineHeader({ ) : null}
- {score.alpha}-{score.bravo} + + {score.alpha}-{score.bravo} + + {isOngoing ? ( + + {t("q:match.timeline.live")} + + ) : null}
m.winnerGroupId !== null, + ); + const tabs: Array<"join" | "rosters" | "action" | "result"> = []; if (isLocked) { tabs.push("result", "rosters"); @@ -83,6 +87,7 @@ export function SendouQMatchTabs({ data }: { data: SendouQMatchLoaderData }) { tabs.push("rosters"); } if (showActionTab) tabs.push("action"); + if (!isLocked && hasReportedMaps) tabs.push("result"); const allMembers = [ ...data.match.groupAlpha.members, @@ -126,12 +131,13 @@ export function SendouQMatchTabs({ data }: { data: SendouQMatchLoaderData }) { close={() => navigate(sendouQMatchPage(data.match.id))} /> - {isLocked ? ( + {isLocked || hasReportedMaps ? ( {data.match.cancelRequestedByUserId ? (

diff --git a/app/features/tournament-match/components/TournamentMatchTabs.tsx b/app/features/tournament-match/components/TournamentMatchTabs.tsx index abc7b57cf..467991f40 100644 --- a/app/features/tournament-match/components/TournamentMatchTabs.tsx +++ b/app/features/tournament-match/components/TournamentMatchTabs.tsx @@ -81,12 +81,15 @@ export function TournamentMatchTabs({ const leagueRoundLocked = isLeagueRoundLocked(tournament, data.match.roundId); + const hasReportedMaps = data.results.length > 0; + const tabs = resolveVisibleTabs({ matchIsOver: data.matchIsOver, canReportScore, isParticipant, hasCurrentMap: Boolean(currentMap), hasMissingActiveRoster, + hasReportedMaps, isPickBanStep, hasPickBanSetup, isAdminEligible, @@ -105,6 +108,7 @@ export function TournamentMatchTabs({ bravo: data.match.opponentTwo?.score ?? 0, }} maps={resolveTimelineMaps(data, opponentOneId, opponentTwoId)} + isOngoing={!data.matchIsOver && hasReportedMaps} /> ) : null} {tabs.includes("join") ? : null} @@ -384,6 +388,7 @@ function resolveVisibleTabs({ isParticipant, hasCurrentMap, hasMissingActiveRoster, + hasReportedMaps, isPickBanStep, hasPickBanSetup, isAdminEligible, @@ -394,6 +399,7 @@ function resolveVisibleTabs({ isParticipant: boolean; hasCurrentMap: boolean; hasMissingActiveRoster: boolean; + hasReportedMaps: boolean; isPickBanStep: boolean; hasPickBanSetup: boolean; isAdminEligible: boolean; @@ -423,6 +429,9 @@ function resolveVisibleTabs({ if (isAdminEligible) { tabs.push("admin"); } + if (!matchIsOver && hasReportedMaps) { + tabs.push("result"); + } return tabs; } diff --git a/locales/da/q.json b/locales/da/q.json index 0625aba10..4ea00ddb3 100644 --- a/locales/da/q.json +++ b/locales/da/q.json @@ -202,6 +202,7 @@ "match.timeline.loss": "", "match.timeline.out": "", "match.timeline.in": "", + "match.timeline.live": "", "match.timeline.points": "", "match.timeline.teamSp": "", "match.waitingForConfirmation": "", diff --git a/locales/de/q.json b/locales/de/q.json index 4a0af5faf..cadb79ea1 100644 --- a/locales/de/q.json +++ b/locales/de/q.json @@ -202,6 +202,7 @@ "match.timeline.loss": "", "match.timeline.out": "", "match.timeline.in": "", + "match.timeline.live": "", "match.timeline.points": "", "match.timeline.teamSp": "", "match.waitingForConfirmation": "", diff --git a/locales/en/q.json b/locales/en/q.json index 9d623345d..d55b4425c 100644 --- a/locales/en/q.json +++ b/locales/en/q.json @@ -202,6 +202,7 @@ "match.timeline.loss": "Loss", "match.timeline.out": "Out", "match.timeline.in": "In", + "match.timeline.live": "LIVE", "match.timeline.points": "{{count}}p", "match.timeline.teamSp": "Team SP", "match.waitingForConfirmation": "Waiting for the other team to confirm the result", diff --git a/locales/es-ES/q.json b/locales/es-ES/q.json index a02a254db..fd7ba7652 100644 --- a/locales/es-ES/q.json +++ b/locales/es-ES/q.json @@ -202,6 +202,7 @@ "match.timeline.loss": "", "match.timeline.out": "", "match.timeline.in": "", + "match.timeline.live": "", "match.timeline.points": "", "match.timeline.teamSp": "", "match.waitingForConfirmation": "", diff --git a/locales/es-US/q.json b/locales/es-US/q.json index 7bf13b1d6..31fa73e83 100644 --- a/locales/es-US/q.json +++ b/locales/es-US/q.json @@ -202,6 +202,7 @@ "match.timeline.loss": "", "match.timeline.out": "", "match.timeline.in": "", + "match.timeline.live": "", "match.timeline.points": "", "match.timeline.teamSp": "", "match.waitingForConfirmation": "", diff --git a/locales/fr-CA/q.json b/locales/fr-CA/q.json index 837d5ca89..e2ee60bdd 100644 --- a/locales/fr-CA/q.json +++ b/locales/fr-CA/q.json @@ -202,6 +202,7 @@ "match.timeline.loss": "", "match.timeline.out": "", "match.timeline.in": "", + "match.timeline.live": "", "match.timeline.points": "", "match.timeline.teamSp": "", "match.waitingForConfirmation": "", diff --git a/locales/fr-EU/q.json b/locales/fr-EU/q.json index 14de13aa9..a7974e8d1 100644 --- a/locales/fr-EU/q.json +++ b/locales/fr-EU/q.json @@ -202,6 +202,7 @@ "match.timeline.loss": "", "match.timeline.out": "", "match.timeline.in": "", + "match.timeline.live": "", "match.timeline.points": "", "match.timeline.teamSp": "", "match.waitingForConfirmation": "", diff --git a/locales/he/q.json b/locales/he/q.json index 0a2d612ea..08dfb7a72 100644 --- a/locales/he/q.json +++ b/locales/he/q.json @@ -202,6 +202,7 @@ "match.timeline.loss": "", "match.timeline.out": "", "match.timeline.in": "", + "match.timeline.live": "", "match.timeline.points": "", "match.timeline.teamSp": "", "match.waitingForConfirmation": "", diff --git a/locales/it/q.json b/locales/it/q.json index 442d0ab97..54b1f64e7 100644 --- a/locales/it/q.json +++ b/locales/it/q.json @@ -202,6 +202,7 @@ "match.timeline.loss": "", "match.timeline.out": "", "match.timeline.in": "", + "match.timeline.live": "", "match.timeline.points": "", "match.timeline.teamSp": "", "match.waitingForConfirmation": "", diff --git a/locales/ja/q.json b/locales/ja/q.json index 6773ba637..86eded445 100644 --- a/locales/ja/q.json +++ b/locales/ja/q.json @@ -202,6 +202,7 @@ "match.timeline.loss": "", "match.timeline.out": "", "match.timeline.in": "", + "match.timeline.live": "", "match.timeline.points": "", "match.timeline.teamSp": "", "match.waitingForConfirmation": "", diff --git a/locales/ko/q.json b/locales/ko/q.json index 4a0af5faf..cadb79ea1 100644 --- a/locales/ko/q.json +++ b/locales/ko/q.json @@ -202,6 +202,7 @@ "match.timeline.loss": "", "match.timeline.out": "", "match.timeline.in": "", + "match.timeline.live": "", "match.timeline.points": "", "match.timeline.teamSp": "", "match.waitingForConfirmation": "", diff --git a/locales/nl/q.json b/locales/nl/q.json index 4a0af5faf..cadb79ea1 100644 --- a/locales/nl/q.json +++ b/locales/nl/q.json @@ -202,6 +202,7 @@ "match.timeline.loss": "", "match.timeline.out": "", "match.timeline.in": "", + "match.timeline.live": "", "match.timeline.points": "", "match.timeline.teamSp": "", "match.waitingForConfirmation": "", diff --git a/locales/pl/q.json b/locales/pl/q.json index 4a0af5faf..cadb79ea1 100644 --- a/locales/pl/q.json +++ b/locales/pl/q.json @@ -202,6 +202,7 @@ "match.timeline.loss": "", "match.timeline.out": "", "match.timeline.in": "", + "match.timeline.live": "", "match.timeline.points": "", "match.timeline.teamSp": "", "match.waitingForConfirmation": "", diff --git a/locales/pt-BR/q.json b/locales/pt-BR/q.json index b8500f752..2217ec652 100644 --- a/locales/pt-BR/q.json +++ b/locales/pt-BR/q.json @@ -202,6 +202,7 @@ "match.timeline.loss": "", "match.timeline.out": "", "match.timeline.in": "", + "match.timeline.live": "", "match.timeline.points": "", "match.timeline.teamSp": "", "match.waitingForConfirmation": "", diff --git a/locales/ru/q.json b/locales/ru/q.json index 628ce08ba..76c9d366f 100644 --- a/locales/ru/q.json +++ b/locales/ru/q.json @@ -202,6 +202,7 @@ "match.timeline.loss": "", "match.timeline.out": "", "match.timeline.in": "", + "match.timeline.live": "", "match.timeline.points": "", "match.timeline.teamSp": "", "match.waitingForConfirmation": "", diff --git a/locales/zh/q.json b/locales/zh/q.json index 0e1f6a25a..15d206da6 100644 --- a/locales/zh/q.json +++ b/locales/zh/q.json @@ -202,6 +202,7 @@ "match.timeline.loss": "", "match.timeline.out": "", "match.timeline.in": "", + "match.timeline.live": "", "match.timeline.points": "", "match.timeline.teamSp": "", "match.waitingForConfirmation": "",