mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-06 05:48:00 +03:00
feat: Display Flare Rank in DDR scores (#1159)
* feat: Display Flare Rank in DDR scores * chore: lint fix in client * fix: change position of Flare in score columns
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import React from "react";
|
||||
|
||||
export default function FlareCell({ value }: { value: string }) {
|
||||
return (
|
||||
<td
|
||||
style={{
|
||||
whiteSpace: "nowrap",
|
||||
}}
|
||||
>
|
||||
<strong>{value}</strong>
|
||||
</td>
|
||||
);
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import React from "react";
|
||||
import RatingCell from "components/tables/cells/RatingCell";
|
||||
import LampCell from "../../components/tables/cells/LampCell";
|
||||
import DDRScoreCell from "../../components/tables/cells/DDRScoreCell";
|
||||
import FlareCell from "../../components/tables/cells/FlareCell";
|
||||
import { bg, bgc } from "./_util";
|
||||
|
||||
const DDR_ENUM_COLOURS: GPTClientImplementation<GPTStrings["ddr"]>["enumColours"] = {
|
||||
@@ -50,6 +51,7 @@ const DDR_DIFF_COLOURS: GPTClientImplementation<GPTStrings["ddr"]>["difficultyCo
|
||||
|
||||
const DDR_HEADERS: GPTClientImplementation<"ddr:SP" | "ddr:DP">["scoreHeaders"] = [
|
||||
["Score", "Score", NumericSOV((x) => x.scoreData.score)],
|
||||
["Flare", "Flare", NumericSOV((x) => x.scoreData.optional.enumIndexes.flare ?? 0)],
|
||||
["Lamp", "Lamp", NumericSOV((x) => x.scoreData.enumIndexes.lamp)],
|
||||
];
|
||||
|
||||
@@ -109,6 +111,7 @@ const DDRCoreCells: GPTClientImplementation<GPTStrings["ddr"]>["scoreCoreCells"]
|
||||
grade={sc.scoreData.grade}
|
||||
score={sc.scoreData.score}
|
||||
/>
|
||||
<FlareCell value={sc.scoreData.optional.flare ?? "0"}></FlareCell>
|
||||
<LampCell lamp={sc.scoreData.lamp} colour={GetEnumColour(sc, "lamp")} />
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -32,10 +32,6 @@ interface PBScoreDocumentWithSong extends PBScoreDocument<"ddr:DP" | "ddr:SP"> {
|
||||
top?: number;
|
||||
}
|
||||
|
||||
const FLARE_0_POINTS = [
|
||||
145, 155, 170, 185, 205, 230, 255, 290, 335, 400, 465, 510, 545, 575, 600, 620, 635, 650, 665,
|
||||
];
|
||||
|
||||
const DDR_GOAL_FMT: GPTGoalFormatters<"ddr:DP" | "ddr:SP"> = {
|
||||
score: GoalFmtScore,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user