mirror of https://github.com/hykilpikonna/AquaDX
commit
f282197611
|
@ -16,7 +16,15 @@
|
||||||
let mapData = g.split(":").map(Number)
|
let mapData = g.split(":").map(Number)
|
||||||
let mult = getMult(mapData[3], game)
|
let mult = getMult(mapData[3], game)
|
||||||
let mapRank: number | undefined = meta?.notes?.[mapData[1] === 10 ? 0 : mapData[1]]?.lv
|
let mapRank: number | undefined = meta?.notes?.[mapData[1] === 10 ? 0 : mapData[1]]?.lv
|
||||||
</script>
|
|
||||||
|
let gameIndexMap = {
|
||||||
|
'mai2': 3,
|
||||||
|
'ongeki': 2,
|
||||||
|
'chu3': 2
|
||||||
|
};
|
||||||
|
|
||||||
|
let gameIndex = gameIndexMap[game as keyof typeof gameIndexMap];
|
||||||
|
</script>
|
||||||
|
|
||||||
<div class="map-detail-container" transition:slide>
|
<div class="map-detail-container" transition:slide>
|
||||||
<div class="scores">
|
<div class="scores">
|
||||||
|
@ -30,11 +38,11 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="second-line">
|
<div class="second-line">
|
||||||
<span class={`rank-${getMult(mapData[3], game)[2].toString()[0]}`}>
|
<span class={`rank-${getMult(mapData[gameIndex], game)[2].toString()[0]}`}>
|
||||||
|
|
||||||
<span class="rank-text">{("" + getMult(mapData[3], game)[2]).replace("p", "+")}</span>
|
<span class="rank-text">{("" + getMult(mapData[gameIndex], game)[2]).replace("p", "+")}</span>
|
||||||
<span class="rank-num" use:tooltip={(mapData[3] / 10000).toFixed(4)}>
|
<span class="rank-num" use:tooltip={(mapData[gameIndex] / 10000).toFixed(4)}>
|
||||||
{roundFloor(mapData[3], game, 1)}%
|
{roundFloor(mapData[gameIndex], game, 1)}%
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
{#if game === 'mai2'}
|
{#if game === 'mai2'}
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
import type { GenericGamePlaylog } from "./generalTypes";
|
||||||
|
|
||||||
|
export interface OngekiUserSummaryEntry {
|
||||||
|
name: string
|
||||||
|
iconId: number
|
||||||
|
serverRank: number
|
||||||
|
accuracy: number
|
||||||
|
rating: number
|
||||||
|
ratingHighest: number
|
||||||
|
ranks: { name: string, count: number }[]
|
||||||
|
maxCombo: number
|
||||||
|
fullCombo: number
|
||||||
|
allPerfect: number
|
||||||
|
totalDxScore: number
|
||||||
|
plays: number
|
||||||
|
totalPlayTime: number
|
||||||
|
joined: string
|
||||||
|
lastSeen: string
|
||||||
|
lastVersion: string
|
||||||
|
best30: string
|
||||||
|
best15: string
|
||||||
|
recent10: string
|
||||||
|
recent: GenericGamePlaylog[]
|
||||||
|
}
|
|
@ -231,6 +231,19 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{#if d.user.ratingComposition.best30}
|
||||||
|
<div>
|
||||||
|
<h2>B30</h2>
|
||||||
|
<div class="rating-composition">
|
||||||
|
{#each d.user.ratingComposition.best30.split(",") as map}
|
||||||
|
<div>
|
||||||
|
<MapDetails g={map} meta={allMusics[map.split(":")[0]]} game={game}/>
|
||||||
|
</div>
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
{#if d.user.ratingComposition.best35}
|
{#if d.user.ratingComposition.best35}
|
||||||
<div>
|
<div>
|
||||||
<h2>B35</h2>
|
<h2>B35</h2>
|
||||||
|
@ -257,6 +270,19 @@
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
{#if d.user.ratingComposition.recent10}
|
||||||
|
<div>
|
||||||
|
<h2>R10</h2>
|
||||||
|
<div class="rating-composition-2">
|
||||||
|
{#each d.user.ratingComposition.recent10.split(",") as map}
|
||||||
|
<div>
|
||||||
|
<MapDetails g={map} meta={allMusics[map.split(":")[0]]} game={game}/>
|
||||||
|
</div>
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<div class="recent">
|
<div class="recent">
|
||||||
<h2>{t('UserHome.RecentScores')}</h2>
|
<h2>{t('UserHome.RecentScores')}</h2>
|
||||||
<div class="scores">
|
<div class="scores">
|
||||||
|
@ -550,4 +576,10 @@
|
||||||
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr))
|
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr))
|
||||||
gap: $gap
|
gap: $gap
|
||||||
|
|
||||||
|
.rating-composition-2
|
||||||
|
display: grid
|
||||||
|
// 2 columns
|
||||||
|
grid-template-columns: repeat(auto-fill, minmax(290px, 1fr))
|
||||||
|
gap: $gap
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -29,11 +29,15 @@ class Ongeki(
|
||||||
) }
|
) }
|
||||||
|
|
||||||
override suspend fun userSummary(username: String) = us.cardByName(username) { card ->
|
override suspend fun userSummary(username: String) = us.cardByName(username) { card ->
|
||||||
// val extra = userGeneralDataRepository.findByUser_Card_ExtId(u.ghostCard.extId)
|
val extra = userGeneralDataRepository.findByUser_Card_ExtId(card.extId)
|
||||||
// .associate { it.propertyKey to it.propertyValue }
|
.associate { it.propertyKey to it.propertyValue }
|
||||||
|
|
||||||
// TODO: Rating composition
|
val ratingComposition = mapOf(
|
||||||
|
"best30" to (extra["rating_base_best"] ?: ""),
|
||||||
|
"best15" to (extra["rating_base_new_best"] ?: ""),
|
||||||
|
"recent10" to (extra["rating_base_hot_best"] ?: "")
|
||||||
|
)
|
||||||
|
|
||||||
genericUserSummary(card, mapOf())
|
genericUserSummary(card, ratingComposition)
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue