From 43d0e8fb785092bb687fadd0bfef474dd2adabe3 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Wed, 16 Mar 2022 17:13:57 +0200 Subject: [PATCH] Detailed matches --- .env.example | 3 + app/components/Avatar.tsx | 11 +- app/components/icons/Clock.tsx | 16 + app/components/play/DetailedPlayers.tsx | 50 + app/components/play/GroupMembers.tsx | 7 +- app/components/play/MatchTeams.tsx | 142 ++ .../play/SplatnetIcon/AutoBombRush.tsx | 244 +++ app/components/play/SplatnetIcon/Baller.tsx | 38 + .../play/SplatnetIcon/BooyahBomb.tsx | 83 + .../play/SplatnetIcon/BubbleBlower.tsx | 23 + .../play/SplatnetIcon/BurstBombRush.tsx | 91 + .../play/SplatnetIcon/ColorDefs.tsx | 1878 +++++++++++++++++ .../play/SplatnetIcon/CurlingBombRush.tsx | 82 + app/components/play/SplatnetIcon/Deaths.tsx | 29 + app/components/play/SplatnetIcon/InkArmor.tsx | 27 + app/components/play/SplatnetIcon/InkStorm.tsx | 43 + app/components/play/SplatnetIcon/Inkjet.tsx | 64 + app/components/play/SplatnetIcon/Kills.tsx | 32 + .../play/SplatnetIcon/Splashdown.tsx | 55 + .../play/SplatnetIcon/SplatBombRush.tsx | 187 ++ app/components/play/SplatnetIcon/Stingray.tsx | 64 + .../play/SplatnetIcon/SuctionBombRush.tsx | 184 ++ .../play/SplatnetIcon/TentaMissiles.tsx | 143 ++ .../play/SplatnetIcon/UltraStamp.tsx | 179 ++ app/components/play/SplatnetIcon/index.tsx | 192 ++ app/core/lanista.ts | 60 + .../play/playerInfos/playerInfos.server.ts | 5 + app/core/play/utils.ts | 1 + app/models/LFGMatch.server.ts | 3 + app/routes/play/looking.tsx | 1 + app/routes/play/match.$id.tsx | 129 +- app/styles/play-match.css | 1007 ++++++++- app/utils/index.ts | 23 + app/utils/sorters.ts | 6 + app/utils/urls.ts | 8 + package-lock.json | 283 ++- package.json | 16 +- 37 files changed, 5194 insertions(+), 215 deletions(-) create mode 100644 app/components/icons/Clock.tsx create mode 100644 app/components/play/DetailedPlayers.tsx create mode 100644 app/components/play/MatchTeams.tsx create mode 100644 app/components/play/SplatnetIcon/AutoBombRush.tsx create mode 100644 app/components/play/SplatnetIcon/Baller.tsx create mode 100644 app/components/play/SplatnetIcon/BooyahBomb.tsx create mode 100644 app/components/play/SplatnetIcon/BubbleBlower.tsx create mode 100644 app/components/play/SplatnetIcon/BurstBombRush.tsx create mode 100644 app/components/play/SplatnetIcon/ColorDefs.tsx create mode 100644 app/components/play/SplatnetIcon/CurlingBombRush.tsx create mode 100644 app/components/play/SplatnetIcon/Deaths.tsx create mode 100644 app/components/play/SplatnetIcon/InkArmor.tsx create mode 100644 app/components/play/SplatnetIcon/InkStorm.tsx create mode 100644 app/components/play/SplatnetIcon/Inkjet.tsx create mode 100644 app/components/play/SplatnetIcon/Kills.tsx create mode 100644 app/components/play/SplatnetIcon/Splashdown.tsx create mode 100644 app/components/play/SplatnetIcon/SplatBombRush.tsx create mode 100644 app/components/play/SplatnetIcon/Stingray.tsx create mode 100644 app/components/play/SplatnetIcon/SuctionBombRush.tsx create mode 100644 app/components/play/SplatnetIcon/TentaMissiles.tsx create mode 100644 app/components/play/SplatnetIcon/UltraStamp.tsx create mode 100644 app/components/play/SplatnetIcon/index.tsx create mode 100644 app/core/lanista.ts create mode 100644 app/utils/sorters.ts diff --git a/.env.example b/.env.example index 85b197214..84953e12e 100644 --- a/.env.example +++ b/.env.example @@ -7,3 +7,6 @@ DISCORD_CLIENT_ID= DISCORD_CLIENT_SECRET= COOKIE_SECRET= FRONT_PAGE_URL=http://localhost:3000/ +LANISTA_TOKEN=lanista +LANISTA_URL= +LANISTA_URL_TOKEN= \ No newline at end of file diff --git a/app/components/Avatar.tsx b/app/components/Avatar.tsx index 7f2003433..055bfcc28 100644 --- a/app/components/Avatar.tsx +++ b/app/components/Avatar.tsx @@ -3,20 +3,21 @@ import { MyCSSProperties } from "~/utils"; export function Avatar({ user, - tiny = false, + size, }: { user: { discordId: string; discordAvatar: string | null }; - tiny?: boolean; + size?: "tiny" | "mini"; }) { const style: MyCSSProperties = { - "--_avatar-size": tiny ? "2rem" : undefined, + "--_avatar-size": + size === "tiny" ? "2rem" : size === "mini" ? "1.5rem" : undefined, }; return ( -