From ecdcc07d817b780154834447005745d8c93d2aec Mon Sep 17 00:00:00 2001 From: Trenton Zimmer <66042448+trmazi@users.noreply.github.com> Date: Mon, 1 Jun 2026 09:35:06 -0400 Subject: [PATCH] Move record card box to new component, update player view --- src/components/Cards/RecordCardBox.vue | 68 ++++++++++++++++++ src/views/Game/PlayerView.vue | 4 +- src/views/Game/SongView.vue | 99 ++++++++------------------ 3 files changed, 99 insertions(+), 72 deletions(-) create mode 100644 src/components/Cards/RecordCardBox.vue diff --git a/src/components/Cards/RecordCardBox.vue b/src/components/Cards/RecordCardBox.vue new file mode 100644 index 00000000..6653cea5 --- /dev/null +++ b/src/components/Cards/RecordCardBox.vue @@ -0,0 +1,68 @@ + + + diff --git a/src/views/Game/PlayerView.vue b/src/views/Game/PlayerView.vue index 37ba2bbc..d576677e 100644 --- a/src/views/Game/PlayerView.vue +++ b/src/views/Game/PlayerView.vue @@ -830,9 +830,7 @@ const groupedTimeline = computed(() => { -
+
{{ session.count }} {{ session.count === 1 ? "play" : "plays" }} diff --git a/src/views/Game/SongView.vue b/src/views/Game/SongView.vue index 888ab463..8db10b82 100644 --- a/src/views/Game/SongView.vue +++ b/src/views/Game/SongView.vue @@ -15,12 +15,12 @@ import CardBoxWidget from "@/components/CardBoxWidget.vue"; import GeneralTable from "@/components/GeneralTable.vue"; import FormControl from "@/components/FormControl.vue"; import GameHeader from "@/components/Cards/GameHeader.vue"; +import RecordCardBox from "@/components/Cards/RecordCardBox.vue"; import { useMainStore } from "@/stores/main.js"; import { APIGetTopScore, APIGetRecordData } from "@/stores/api/music"; import { getGameInfo, GameConstants } from "@/constants"; import { formatDifficulty } from "@/constants/scoreDataFilters"; -import { getNestedValue } from "@/constants/values"; import { hydrateScoreData } from "@/helpers/score"; import { formatIIDXScore } from "@/helpers/score/iidx"; import { topScoreHeaders, formatScoreTable } from "@/constants/table/scores"; @@ -30,7 +30,7 @@ const $router = useRouter(); var gameId = $route.params.game; var songId = $route.params.songId; const thisGame = getGameInfo(gameId); -var songData = ref({}); +var songData = ref(null); var anyRecords = ref(false); var personalRecords = ref({}); @@ -118,6 +118,21 @@ const selectedChartRecords = computed(() => { return formatScoreTable(thisGame, chart?.records ?? []); }); +const chartDifficulties = computed(() => { + return songData.value.charts + .filter( + (chart) => + chart.data?.difficulty !== 0 && thisGame.chartTable[chart.chart], + ) + .map( + (chart) => + `${thisGame.chartTable[chart.chart]} - ${formatDifficulty( + chart.data.difficulty, + thisGame.difficultyDenom, + )}`, + ); +}); + const navigateToProfile = (item) => { const userId = item.userId; $router.push(`/games/${gameId}/profiles/${userId}`); @@ -126,7 +141,7 @@ const navigateToProfile = (item) => {