diff --git a/backend/src/api/controllers/user.ts b/backend/src/api/controllers/user.ts index 0a27c573b..317fc5ab0 100644 --- a/backend/src/api/controllers/user.ts +++ b/backend/src/api/controllers/user.ts @@ -472,6 +472,7 @@ export async function getProfile( discordAvatar, xp, streak: streak?.length ?? 0, + maxStreak: streak?.maxLength ?? 0, }; if (banned) { diff --git a/frontend/src/ts/elements/profile.ts b/frontend/src/ts/elements/profile.ts index f8c33eadf..0d29a4b9c 100644 --- a/frontend/src/ts/elements/profile.ts +++ b/frontend/src/ts/elements/profile.ts @@ -79,9 +79,15 @@ export async function update( `Current streak: ${profile.streak} ${ profile.streak === 1 ? "day" : "days" }` + ) + .attr( + "aria-label", + `Longest streak: ${profile.maxStreak} ${ + profile.maxStreak === 1 ? "day" : "days" + }` ); } else { - details.find(".streak").text(""); + details.find(".streak").text("").attr("aria-label", ""); } const typingStatsEl = details.find(".typingStats"); diff --git a/frontend/src/ts/pages/profile.ts b/frontend/src/ts/pages/profile.ts index be193999b..7f6eb66b5 100644 --- a/frontend/src/ts/pages/profile.ts +++ b/frontend/src/ts/pages/profile.ts @@ -20,7 +20,7 @@ function reset(): void {
-
-
-
+
-
-
diff --git a/frontend/static/html/pages/account.html b/frontend/static/html/pages/account.html index 15bd58b33..ab5b86906 100644 --- a/frontend/static/html/pages/account.html +++ b/frontend/static/html/pages/account.html @@ -33,7 +33,7 @@
-
-
-
+
-
-
diff --git a/frontend/static/html/pages/profile.html b/frontend/static/html/pages/profile.html index 1c9b02d00..78644d9fc 100644 --- a/frontend/static/html/pages/profile.html +++ b/frontend/static/html/pages/profile.html @@ -17,7 +17,7 @@
-
-
-
+
-
-