From 4ef9b087fc8b5583578f22b7033eb5b5d7afbe94 Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Mon, 3 Oct 2022 21:33:33 +0100 Subject: [PATCH] feat: add bms table colours --- .../tables/cells/BMSOrPMSDifficultyCell.tsx | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/client/src/components/tables/cells/BMSOrPMSDifficultyCell.tsx b/client/src/components/tables/cells/BMSOrPMSDifficultyCell.tsx index f46742fba..887fa9f2b 100644 --- a/client/src/components/tables/cells/BMSOrPMSDifficultyCell.tsx +++ b/client/src/components/tables/cells/BMSOrPMSDifficultyCell.tsx @@ -3,7 +3,7 @@ import { FormatTables } from "util/misc"; import QuickTooltip from "components/layout/misc/QuickTooltip"; import Icon from "components/util/Icon"; import React from "react"; -import { ChartDocument, COLOUR_SET } from "tachi-common"; +import { BMS_TABLES, ChartDocument, COLOUR_SET } from "tachi-common"; import Muted from "components/util/Muted"; import TierlistInfoPart from "./TierlistInfoPart"; @@ -19,14 +19,22 @@ export default function BMSOrPMSDifficultyCell({ const aiLevel = game === "bms" && (chart as ChartDocument<"bms:7K" | "bms:14K">).data.aiLevel; let levelText = "No Rating"; + let backgroundColour = hasLevel ? COLOUR_SET.red : COLOUR_SET.gray; + if (hasLevel) { levelText = FormatTables(chart.data.tableFolders); + + if (game === "bms") { + // use bms table colour instead of just red/gray. + // todo: add pms table colours maybe? + backgroundColour = FindTableColour(chart.data.tableFolders); + } } return (