oops
This commit is contained in:
parent
1c2214a659
commit
0ec1fc9d41
@ -708,6 +708,7 @@ export class ScoreService {
|
|||||||
pp: previousScore.pp,
|
pp: previousScore.pp,
|
||||||
weight: previousScore.weight,
|
weight: previousScore.weight,
|
||||||
maxCombo: previousScore.maxCombo,
|
maxCombo: previousScore.maxCombo,
|
||||||
|
timestamp: previousScore.timestamp,
|
||||||
change: {
|
change: {
|
||||||
score: score.score - previousScore.score,
|
score: score.score - previousScore.score,
|
||||||
accuracy: score.accuracy - previousScore.accuracy,
|
accuracy: score.accuracy - previousScore.accuracy,
|
||||||
|
@ -35,4 +35,9 @@ export type PreviousScore = {
|
|||||||
* The full combo of the previous score.
|
* The full combo of the previous score.
|
||||||
*/
|
*/
|
||||||
fullCombo?: boolean;
|
fullCombo?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When the previous score was set.
|
||||||
|
*/
|
||||||
|
timestamp: Date;
|
||||||
};
|
};
|
||||||
|
@ -5,6 +5,7 @@ import { getPageFromRank } from "@ssr/common/utils/utils";
|
|||||||
import { ScoreSaberScore } from "@ssr/common/model/score/impl/scoresaber-score";
|
import { ScoreSaberScore } from "@ssr/common/model/score/impl/scoresaber-score";
|
||||||
import ScoreSaberLeaderboard from "@ssr/common/model/leaderboard/impl/scoresaber-leaderboard";
|
import ScoreSaberLeaderboard from "@ssr/common/model/leaderboard/impl/scoresaber-leaderboard";
|
||||||
import { ScoreTimeSet } from "@/components/score/score-time-set";
|
import { ScoreTimeSet } from "@/components/score/score-time-set";
|
||||||
|
import { timeAgo } from "@ssr/common/utils/time-utils";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
score: ScoreSaberScore;
|
score: ScoreSaberScore;
|
||||||
@ -23,6 +24,12 @@ export default function ScoreRankInfo({ score, leaderboard }: Props) {
|
|||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<ScoreTimeSet score={score} />
|
<ScoreTimeSet score={score} />
|
||||||
|
{score.previousScore?.timestamp && (
|
||||||
|
<div className="text-xs text-gray-400 flex flex-row gap-2 items-center">
|
||||||
|
<p>vs</p>
|
||||||
|
<p>{timeAgo(new Date(score.previousScore.timestamp))}</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -124,8 +124,8 @@ export default function Score({ leaderboard, beatSaverMap, score, settings, high
|
|||||||
: "grid-cols-[20px 1fr_1fr] lg:grid-cols-[0.5fr_4fr_1fr_350px]"; // Original with buttons
|
: "grid-cols-[20px 1fr_1fr] lg:grid-cols-[0.5fr_4fr_1fr_350px]"; // Original with buttons
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="pb-2 pt-2 w-full h-full">
|
<div className="pb-2 pt-2">
|
||||||
<div className={`grid w-full h-full gap-2 lg:gap-0 ${gridColsClass}`}>
|
<div className={`grid w-full gap-2 lg:gap-0 ${gridColsClass}`}>
|
||||||
<ScoreRankInfo score={score} leaderboard={leaderboard} />
|
<ScoreRankInfo score={score} leaderboard={leaderboard} />
|
||||||
<ScoreSongInfo leaderboard={leaderboard} beatSaverMap={beatSaverMap} />
|
<ScoreSongInfo leaderboard={leaderboard} beatSaverMap={beatSaverMap} />
|
||||||
{!settings?.noScoreButtons && (
|
{!settings?.noScoreButtons && (
|
||||||
|
Reference in New Issue
Block a user