Update DDR constants, update record card box

This commit is contained in:
Trenton Zimmer
2026-06-01 11:38:39 -04:00
parent e2734412e6
commit bc3dafd5ea
4 changed files with 23 additions and 22 deletions

View File

@@ -26,7 +26,7 @@ defineProps({
<template>
<CardBox has-table>
<div class="py-6 px-4">
<div class="pt-4 px-4">
<span
v-if="chart.data?.difficulty != 0 && thisGame.chartTable[chart.chart]"
class="text-md md:text-lg p-2 text-slate-400"
@@ -36,7 +36,7 @@ defineProps({
</span>
<span v-if="showUser">{{ record.username }}</span>
<div
class="pt-4 grid grid-cols-2 lg:grid-cols-4 xl:grid-cols-5 2xl:grid-cols-6 gap-6 justify-items-center-safe place-items-center text-center"
class="pt-4 grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 xl:grid-cols-5 2xl:grid-cols-6 gap-6 justify-items-center-safe place-items-center text-center"
>
<div>
<h1 class="font-light text-sm">Points</h1>
@@ -46,23 +46,19 @@ defineProps({
</div>
<template v-for="header of thisGame?.scoreHeaders" :key="header">
<div>
<div v-if="getNestedValue(record, header.value)">
<h1 class="font-light text-sm">
{{ header.text }}
</h1>
<p class="text-md lg:text-lg font-bold text-white">
{{ getNestedValue(record, header.value) ?? "0" }}
{{ getNestedValue(record, header.value) }}
</p>
</div>
</template>
</div>
<span class="px-2 font-light text-slate-300">
<span class="hidden md:block">Updated {{ record.timestamp }}</span>
<div class="block md:hidden text-sm">
Updated<br />
{{ record.timestamp }}
</div>
</span>
<div class="p-2 pb-4 font-light text-slate-300">
<span>Updated {{ record.timestamp }}</span>
</div>
</div>
</CardBox>
</template>

View File

@@ -510,6 +510,7 @@ export const gameData = [
VersionConstants.DDR_A3,
],
scoreHeaders: [
{ text: "EX Score", value: "exscore", width: 80 },
{ text: "Grade", value: "data.rank", width: 80 },
{ text: "Combos", value: "data.combo", width: 80 },
{ text: "Halo", value: "data.halo", width: 80 },
@@ -531,11 +532,11 @@ export const gameData = [
1000: "FAILED",
2000: "CLEARED",
600: "",
4000: "LIFE4 CLEARED",
200: "FULL COMBO",
300: "GREAT FULL COMBO",
400: "PERFECT FULL COMBO",
500: "MARVELOUS FULL COMBO",
4000: "LIFE4",
200: "FC",
300: "GFC",
400: "PFC",
500: "MFC",
},
rankTable: {
100: "E",
@@ -741,11 +742,11 @@ export const gameData = [
1000: "FAILED",
2000: "CLEARED",
600: "",
4000: "LIFE4 CLEARED",
200: "FULL COMBO",
300: "GREAT FULL COMBO",
400: "PERFECT FULL COMBO",
500: "MARVELOUS FULL COMBO",
4000: "LIFE4",
200: "FC",
300: "GFC",
400: "PFC",
500: "MFC",
},
rankTable: {
100: "E",

View File

@@ -187,6 +187,10 @@ export function formatScoreTable(thisGame, scores) {
item.points = item.data?.stats?.score
.toString()
.replace(/\B(?<!\.\d*)(?=(\d{3})+(?!\d))/g, ",");
} else if (item.data?.exscore) {
item.exscore = item.data.exscore
.toString()
.replace(/\B(?<!\.\d*)(?=(\d{3})+(?!\d))/g, ",");
}
formattedItems.push(item);

View File

@@ -169,7 +169,7 @@ const navigateToProfile = (item) => {
title="Personal Records"
main
/>
<div class="grid grid-cols-2 lg:grid-cols-3 gap-4 mb-6">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6">
<template v-for="chart of songData.charts" :key="chart.db_id">
<RecordCardBox
v-if="