diff --git a/app/components/match-page/MatchBanner.tsx b/app/components/match-page/MatchBanner.tsx index 9dc91c31b..2d8ebd23b 100644 --- a/app/components/match-page/MatchBanner.tsx +++ b/app/components/match-page/MatchBanner.tsx @@ -70,7 +70,6 @@ function ScreenNotice({ screenLegal }: Pick) { height={imgSize} alt="" /> - {t("weapons:SPECIAL_19")} } > diff --git a/app/components/match-page/MatchTabs.module.css b/app/components/match-page/MatchTabs.module.css index 4b1d924dc..5db591a40 100644 --- a/app/components/match-page/MatchTabs.module.css +++ b/app/components/match-page/MatchTabs.module.css @@ -10,6 +10,64 @@ } } +.rosters { + display: flex; + flex-wrap: wrap; + gap: var(--s-8); + font-size: var(--font-xs); + font-weight: var(--weight-semi); + flex-direction: column; +} + +@container (width >= 640px) { + .rosters { + justify-content: space-evenly; + flex-direction: row; + } +} + +.rostersSpacedHeader { + min-height: 45px; + display: flex; + align-items: center; +} + +.rosterMembers { + position: relative; + padding-left: 34px; + list-style: none; + display: flex; + flex-direction: column; + gap: var(--s-2); + margin-top: var(--s-1-5); + + &::before { + content: ""; + position: absolute; + left: 21px; + top: -8px; + bottom: 0; + width: 3px; + background-color: var(--color-border-high); + opacity: 0.3; + border-radius: 0 0 var(--radius-field) var(--radius-field); + } +} + +.teamOneDot { + border-radius: 100%; + background-color: var(--color-accent); + width: 8px; + height: 8px; +} + +.teamTwoDot { + border-radius: 100%; + background-color: var(--color-second); + width: 8px; + height: 8px; +} + .joinContent { display: flex; gap: var(--s-4); diff --git a/app/components/match-page/MatchTabs.tsx b/app/components/match-page/MatchTabs.tsx index 5655e71e3..0fb1bfbcb 100644 --- a/app/components/match-page/MatchTabs.tsx +++ b/app/components/match-page/MatchTabs.tsx @@ -2,10 +2,12 @@ import { DoorOpen, Tally5, Users } from "lucide-react"; import { QRCodeSVG } from "qrcode.react"; import type * as React from "react"; import { useTranslation } from "react-i18next"; -import { useSearchParams } from "react-router"; +import { Link, useSearchParams } from "react-router"; import { Alert } from "~/components/Alert"; +import { Avatar } from "~/components/Avatar"; import invariant from "~/utils/invariant"; import type { CommonUser } from "~/utils/kysely.server"; +import { userPage } from "~/utils/urls"; import { SendouTab, SendouTabList, @@ -71,8 +73,75 @@ export function MatchTabs({ children, tabs }: MatchTabsProps) { // xxx: extract tabs to different components -export function MatchRosterTab() { - return Roster content; +interface RosterTabTeam { + team?: { + name: string; + url: string; + avatar?: string; + }; + members: Array; +} + +interface MatchRosterTabProps { + teams: [RosterTabTeam, RosterTabTeam]; +} + +export function MatchRosterTab({ teams }: MatchRosterTabProps) { + return ( + +
+ + +
+
+ ); +} + +function TeamRoster({ + team, + side, +}: { + team: RosterTabTeam; + side: "alpha" | "bravo"; +}) { + const dotClassName = side === "alpha" ? styles.teamOneDot : styles.teamTwoDot; + const label = side === "alpha" ? "Alpha" : "Bravo"; + + return ( +
+ {team.team ? ( + + +
+

{team.team.name}

+
+
+ {label} +
+
+ + ) : null} + {team.members.length > 0 ? ( +
    + {team.members.map((member) => ( +
  • + + + {member.username} + +
  • + ))} +
+ ) : null} +
+ ); } export function MatchActionTab() { diff --git a/app/features/match-page-test/routes/match-page-test.tsx b/app/features/match-page-test/routes/match-page-test.tsx index e349f060b..b4b74cf74 100644 --- a/app/features/match-page-test/routes/match-page-test.tsx +++ b/app/features/match-page-test/routes/match-page-test.tsx @@ -138,7 +138,76 @@ export default function MatchPageTestRoute() { pass="8430" showNoSplatnetAlert /> - + diff --git a/app/styles/utils.css b/app/styles/utils.css index 598e79955..fbcd658af 100644 --- a/app/styles/utils.css +++ b/app/styles/utils.css @@ -367,6 +367,10 @@ margin: 0 auto; } + .line-height-tight { + line-height: 1.3; + } + .hidden { display: none; }