Fix leaderboard submission display issue: update frontend to correctly handle score vs points
This commit is contained in:
@@ -380,7 +380,8 @@ class Leaderboard {
|
||||
this.ctx.fillText(displayName, modalX + 140, y + 2)
|
||||
|
||||
// Score with formatting
|
||||
var score = entry.score && entry.score.score ? entry.score.score : 0
|
||||
// Score with formatting
|
||||
var score = entry.score_value !== undefined ? entry.score_value : (entry.score && entry.score.score ? entry.score.score : 0)
|
||||
this.ctx.fillStyle = rank <= 3 ? "#1a1a1a" : "#555555"
|
||||
this.ctx.font = (rank <= 3 ? "bold " : "") + "20px " + (strings.font || "sans-serif")
|
||||
this.ctx.textAlign = "right"
|
||||
|
||||
@@ -235,7 +235,7 @@ class Scoresheet {
|
||||
this.leaderboardData = {
|
||||
songId: songId,
|
||||
difficulty: results.difficulty,
|
||||
scoreObj: Object.assign({}, results)
|
||||
scoreObj: Object.assign({ score: results.points }, results)
|
||||
}
|
||||
// Clean up scoreObj
|
||||
if (this.leaderboardData.scoreObj) {
|
||||
@@ -1025,7 +1025,7 @@ class Scoresheet {
|
||||
this.leaderboardData = {
|
||||
songId: songId,
|
||||
difficulty: difficulty,
|
||||
scoreObj: Object.assign({}, this.resultsObj)
|
||||
scoreObj: Object.assign({ score: this.resultsObj.points }, this.resultsObj)
|
||||
}
|
||||
this.leaderboardSubmitted = false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user