mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-18 13:21:21 +08:00
showing daily bonus
This commit is contained in:
parent
2ee84972ee
commit
389661c300
1 changed files with 4 additions and 2 deletions
|
|
@ -72,7 +72,7 @@ export async function update(
|
|||
export async function updateXpBar(
|
||||
currentXp: number,
|
||||
addedXp: number,
|
||||
_withDailyBonus: boolean
|
||||
withDailyBonus: boolean
|
||||
): Promise<void> {
|
||||
const startingLevel = Misc.getLevel(currentXp);
|
||||
const endingLevel = Misc.getLevel(currentXp + addedXp);
|
||||
|
|
@ -80,7 +80,9 @@ export async function updateXpBar(
|
|||
|
||||
$("#menu .xpBar").stop(true, true).css("opacity", 0);
|
||||
|
||||
$("#menu .xpBar .xpGain").text(`+${addedXp}`);
|
||||
$("#menu .xpBar .xpGain").text(
|
||||
`+${addedXp} ${withDailyBonus ? "daily bonus" : ""}`
|
||||
);
|
||||
|
||||
await Misc.promiseAnimation(
|
||||
$("#menu .xpBar"),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue