diff --git a/frontend/src/html/pages/leaderboards.html b/frontend/src/html/pages/leaderboards.html index 04b2e8eb5885..501c423798a4 100644 --- a/frontend/src/html/pages/leaderboards.html +++ b/frontend/src/html/pages/leaderboards.html @@ -49,8 +49,21 @@ - - + + - + + - +
# + + + + + + # + + + name wpm diff --git a/frontend/src/security-policy.html b/frontend/src/security-policy.html index 939faa39dd7d..4e9a70600ef5 100644 --- a/frontend/src/security-policy.html +++ b/frontend/src/security-policy.html @@ -137,7 +137,8 @@

How to Disclose a Vulnerability

email . - For non-security related platform bugs, follow the bug submission +  For non-security related platform bugs, follow the bug + submission How to Disclose a Vulnerability . - Include as much detail as possible to ensure reproducibility. At a - minimum, vulnerability disclosures should include: +  Include as much detail as possible to ensure reproducibility. At + a minimum, vulnerability disclosures should include:

  • Vulnerability Description
  • diff --git a/frontend/src/styles/leaderboards.scss b/frontend/src/styles/leaderboards.scss index 76dd29ed0454..de63d2e27e51 100644 --- a/frontend/src/styles/leaderboards.scss +++ b/frontend/src/styles/leaderboards.scss @@ -161,10 +161,26 @@ padding: var(--padding); } + .globalRank { + i { + display: none; + } + span { + display: inline; + } + } &.friendsOnly { td:first-child { display: table-cell; } + .globalRank { + i { + display: inline; + } + span { + display: none; + } + } } td:first-child { display: none; diff --git a/frontend/src/ts/controllers/route-controller.ts b/frontend/src/ts/controllers/route-controller.ts index 9f70dd3d9a92..2c0eda4b504f 100644 --- a/frontend/src/ts/controllers/route-controller.ts +++ b/frontend/src/ts/controllers/route-controller.ts @@ -47,8 +47,8 @@ type Route = { const route404: Route = { path: "404", - load: async () => { - await PageController.change("404"); + load: async (_params, options) => { + await PageController.change("404", options); }, }; @@ -224,7 +224,12 @@ async function router(options = {} as NavigateOptions): Promise { }; if (match === undefined) { - await route404.load({}, {}); + await route404.load( + {}, + { + force: true, + } + ); return; } diff --git a/frontend/src/ts/pages/leaderboards.ts b/frontend/src/ts/pages/leaderboards.ts index 54aec813a5c4..888f6a3ac3c1 100644 --- a/frontend/src/ts/pages/leaderboards.ts +++ b/frontend/src/ts/pages/leaderboards.ts @@ -444,10 +444,8 @@ function buildTableRow(entry: LeaderboardEntry, me = false): HTMLElement { } element.dataset["uid"] = entry.uid; element.innerHTML = ` -
${entry.friendsRank ?? ""}${ - entry.rank === 1 ? '' : entry.rank - }${formatRank(entry.friendsRank)}${formatRank(entry.rank)}
@@ -504,9 +502,7 @@ function buildWeeklyTableRow( element.dataset["uid"] = entry.uid; element.innerHTML = `
${ - entry.rank === 1 ? '' : entry.rank - }${formatRank(entry.rank)}
@@ -718,9 +714,7 @@ function fillUser(): void { }; const html = ` -
${ - rank === 1 ? '' : rank - }
+
${formatRank(rank)}
You (${percentileString})
${diffText}
@@ -811,11 +805,7 @@ function fillUser(): void { }; const html = ` -
${ - userData.rank === 1 - ? '' - : userData.rank - }
+
${formatRank(userData.rank)}
You (${percentileString})
${diffText}
@@ -1390,6 +1380,13 @@ function updateTimeText( text.attr("aria-label", localDateString); } +function formatRank(rank: number | undefined): string { + if (rank === undefined) return ""; + if (rank === 1) return ''; + + return rank.toString(); +} + $(".page.pageLeaderboards .jumpButtons button").on("click", function () { const action = $(this).data("action") as Action; if (action !== "goToPage") {