fix: add missing rank - show in a day ranks
continuous-integration/drone/tag Build is passing
Details
continuous-integration/drone/tag Build is passing
Details
This commit is contained in:
parent
593062d6cb
commit
a7c07111ef
|
@ -1,7 +1,7 @@
|
|||
const preambles = {
|
||||
'extended-player-profile': `// ==UserScript==
|
||||
// @name Extended player profile
|
||||
// @version 1.0.0
|
||||
// @version 1.0.1
|
||||
// @description Adds additional info and actions to a player's profile.
|
||||
// @author Dawid Wysokiński - Kichiyaki - contact@dwysokinski.me
|
||||
// @match https://*/game.php?*screen=info_player*
|
||||
|
@ -10,7 +10,8 @@ const preambles = {
|
|||
// @icon https://www.google.com/s2/favicons?domain=plemiona.pl
|
||||
// @grant none
|
||||
// @run-at document-end
|
||||
// ==/UserScript==`,
|
||||
// ==/UserScript==
|
||||
`,
|
||||
};
|
||||
|
||||
const preamble = preambles[process.env.PREAMBLE];
|
||||
|
|
|
@ -327,6 +327,10 @@ class UI {
|
|||
? t(translationKeyByType[s.type])
|
||||
: s.type,
|
||||
},
|
||||
{
|
||||
header: t('Rank'),
|
||||
accessor: (s) => (s.rank ? s.rank.toString() : '0'),
|
||||
},
|
||||
{
|
||||
header: t('Score'),
|
||||
accessor: (s) => (s.score ? s.score.toLocaleString() : '0'),
|
||||
|
|
|
@ -101,6 +101,7 @@ type InADayParams = {
|
|||
};
|
||||
|
||||
export type InADayPlayerScore = {
|
||||
rank: number;
|
||||
score: number;
|
||||
date: string;
|
||||
};
|
||||
|
@ -225,6 +226,7 @@ export class InADayClient {
|
|||
}
|
||||
|
||||
player.scores[key] = {
|
||||
rank: score.rank,
|
||||
score: score.score,
|
||||
date: score.date,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue