fix: add missing rank - show in a day ranks
continuous-integration/drone/tag Build is passing Details

This commit is contained in:
Dawid Wysokiński 2023-01-29 08:30:22 +01:00
parent 593062d6cb
commit a7c07111ef
Signed by: Kichiyaki
GPG Key ID: B5445E357FB8B892
3 changed files with 9 additions and 2 deletions

View File

@ -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];

View File

@ -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'),

View File

@ -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,
};