From 2383a8ba0ad99937396230333f10c59050ddf5c5 Mon Sep 17 00:00:00 2001
From: Pinapelz <yukais@pinapelz.com>
Date: Wed, 27 Aug 2025 16:59:50 -0700
Subject: drs: track and display playstyle for each chart (1/2 players)

---
 .../src/components/displays/DancerushScoreDisplay.tsx   | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

(limited to 'frontend/src/components/displays/DancerushScoreDisplay.tsx')

diff --git a/frontend/src/components/displays/DancerushScoreDisplay.tsx b/frontend/src/components/displays/DancerushScoreDisplay.tsx
index e3bae96..908880c 100644
--- a/frontend/src/components/displays/DancerushScoreDisplay.tsx
+++ b/frontend/src/components/displays/DancerushScoreDisplay.tsx
@@ -3,6 +3,8 @@ import {Link} from "react-router";
 import { globalSkipKeys } from "../../types/constants";
 import dancerushEasyImg from "../../assets/games/dancerush/easy.webp";
 import dancerushNormalImg from "../../assets/games/dancerush/normal.webp";
+import p1_img from "../../assets/games/dancerush/1_p.webp";
+import p2_img from "../../assets/games/dancerush/2_p.webp";
 import SHA1 from "crypto-js/sha1";
 
 interface Score {
@@ -50,6 +52,7 @@ const DancerushScoreDisplay: React.FC<ScoreDisplayProps> = ({
     bad: "Bad",
     miss: "Miss",
     username: "Username",
+    num_players: "Players"
   };
 
   const primaryKeys = ["title", "artist", "song"];
@@ -142,13 +145,13 @@ const DancerushScoreDisplay: React.FC<ScoreDisplayProps> = ({
     }
 
     if(key === "diff_lamp"){
-      return <span className="">
+      return <span>
         <img src={value == "EASY" ? dancerushEasyImg : dancerushNormalImg} alt={value} />
       </span>;
     }
 
     if(key === "lamp"){
-       return <span className=" px-2 py-1 rounded-full">{
+       return <span className="px-2 py-1 rounded-full">{
          (() => {
            switch(value){
              case 1:
@@ -168,6 +171,13 @@ const DancerushScoreDisplay: React.FC<ScoreDisplayProps> = ({
        }</span>;
     }
 
+    if(key === "num_players"){
+      return <span>
+        <img src={value == 1 ? p1_img : p2_img} alt={value + " player"} />
+      </span>
+    }
+
+
     return <span>{formatValue(value, key)}</span>;
   };
 
@@ -248,6 +258,7 @@ const DancerushScoreDisplay: React.FC<ScoreDisplayProps> = ({
     "judgements",
     "maxCombo",
     "combo",
+    "num_players",
     "timestamp",
   ].filter((key) => allKeys.includes(key));
 
@@ -307,7 +318,7 @@ const DancerushScoreDisplay: React.FC<ScoreDisplayProps> = ({
               {/* Main Stats */}
               {mainStats.length > 0 && (
                 <div className="grid grid-cols-2 gap-4 mb-4">
-                  {mainStats.slice(0, 4).map(([key, value]) => (
+                  {mainStats.slice(0, 5).map(([key, value]) => (
                     <div key={key} className="bg-slate-800/50 rounded-lg p-3">
                       <p className="text-slate-400 text-xs uppercase tracking-wide mb-1">
                         {getDisplayName(key)}
-- 
cgit v1.2.3

