diff --git a/frontend/src/ts/test/pb-crown.ts b/frontend/src/ts/test/pb-crown.ts index 9bb424b7b..67c47ade8 100644 --- a/frontend/src/ts/test/pb-crown.ts +++ b/frontend/src/ts/test/pb-crown.ts @@ -3,7 +3,12 @@ export function hide(): void { $("#result .stats .wpm .crown").css("opacity", 0).addClass("hidden"); } -export type CrownType = "normal" | "broken" | "half" | "error" | "warning"; +export type CrownType = + | "normal" + | "ineligible" + | "pending" + | "error" + | "warning"; let visible = false; let currentType: CrownType = "normal"; @@ -28,8 +33,8 @@ export function show(): void { export function update(type: CrownType): void { currentType = type; const el = $("#result .stats .wpm .crown"); - el.removeClass("broken"); - el.removeClass("half"); + el.removeClass("ineligible"); + el.removeClass("pending"); el.removeClass("error"); el.removeClass("warning"); el.addClass(type); diff --git a/frontend/src/ts/test/result.ts b/frontend/src/ts/test/result.ts index 612af48c9..3ff7acb66 100644 --- a/frontend/src/ts/test/result.ts +++ b/frontend/src/ts/test/result.ts @@ -397,7 +397,7 @@ export async function updateCrown(dontSave: boolean): Promise { hideCrown(); } else { //show half crown as the pb is not confirmed by the server - showCrown("half"); + showCrown("pending"); $("#result .stats .wpm .crown").attr( "aria-label", "+" + Format.typingSpeed(pbDiff, { showDecimalPlaces: true }) @@ -423,7 +423,7 @@ export async function updateCrown(dontSave: boolean): Promise { `This result is not eligible for a new PB (${canGetPb.reason})` ); } else { - showCrown("broken"); + showCrown("ineligible"); $("#result .stats .wpm .crown").attr( "aria-label", `You could've gotten a new PB (+${Format.typingSpeed(pbDiff, { @@ -440,7 +440,7 @@ export function hideCrown(): void { } export function showErrorCrownIfNeeded(): void { - if (PbCrown.getCurrentType() !== "half") return; + if (PbCrown.getCurrentType() !== "pending") return; PbCrown.show(); PbCrown.update("error"); $("#result .stats .wpm .crown").attr(