diff --git a/app/components/tournament/DuringMatchActions.tsx b/app/components/tournament/DuringMatchActions.tsx index 2b4b56f49..47ef2f94b 100644 --- a/app/components/tournament/DuringMatchActions.tsx +++ b/app/components/tournament/DuringMatchActions.tsx @@ -1,12 +1,13 @@ import React, { useState } from "react"; import { useMatches } from "remix"; import invariant from "tiny-invariant"; +import { modesShortToLong } from "~/constants"; import { resolveHostInfo } from "~/core/tournament/utils"; import type { BracketModified, FindTournamentByNameForUrlI, } from "~/services/tournament"; -import { Unpacked } from "~/utils"; +import { modeToImageUrl, Unpacked } from "~/utils"; import { Button } from "../Button"; import { ActionSectionWrapper } from "./ActionSectionWrapper"; import { DuringMatchActionsRosters } from "./DuringMatchActionsRosters"; @@ -52,17 +53,29 @@ export function DuringMatchActions({ ["Room pass", `${roomPass} (${weHost ? "We" : "They"} host)`], ["Friend code to add", friendCodeToAdd], ["Score", currentMatch.score?.join("-")], - ["Current map", `${stage.mode} ${stage.name}`], + ["Best of", currentRound.stages.length], ]; return (
)
diff --git a/app/styles/tournament-bracket.css b/app/styles/tournament-bracket.css
index 5119bf5d6..039c51623 100644
--- a/app/styles/tournament-bracket.css
+++ b/app/styles/tournament-bracket.css
@@ -5,6 +5,37 @@
margin: 0 auto;
}
+.tournament-bracket__stage-banner {
+ /* TODO: */
+ background-image: url("https://pbs.twimg.com/media/DoAV42MXsAAtHCh?format=jpg&name=large");
+ height: 10rem;
+ width: 100%;
+ background-position: center;
+ border-radius: var(--rounded);
+}
+
+.tournament-bracket__stage-banner__top-bar {
+ padding: var(--s-2);
+ display: flex;
+ justify-content: space-between;
+ backdrop-filter: blur(5px);
+ background: rgba(0, 0, 0, 0.25);
+ border-start-end-radius: var(--rounded);
+ border-start-start-radius: var(--rounded);
+}
+
+.tournament-bracket__stage-banner__top-bar__header {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ gap: var(--s-2);
+}
+
+.tournament-bracket__stage-banner__top-bar__mode-image {
+ width: 1.5rem;
+ height: 1.5rem;
+}
+
.tournament-bracket__elim__bracket {
display: grid;
column-gap: 2px;
diff --git a/app/utils/index.ts b/app/utils/index.ts
index fd0b31b88..d3ee0ca21 100644
--- a/app/utils/index.ts
+++ b/app/utils/index.ts
@@ -1,3 +1,4 @@
+import { Mode } from "@prisma/client";
import type { CSSProperties } from "react";
import { json, useLocation } from "remix";
import { z } from "zod";
@@ -31,6 +32,14 @@ export function getLogInUrl(location: ReturnType