Skip to content

Commit

Permalink
impr(profile): add reminder about lb opt out
Browse files Browse the repository at this point in the history
Added a reminder which mentions that results are not validated by the anticheat
for accounts that opted out of the leaderboard
  • Loading branch information
Miodec committed Aug 31, 2023
1 parent 6996118 commit cfed190
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
6 changes: 6 additions & 0 deletions frontend/src/styles/profile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@
display: inline;
}
}
.lbOptOutReminder {
grid-column: span 2;
text-align: center;
color: var(--sub-color);
font-size: 0.8em;
}
}

.profile {
Expand Down
11 changes: 11 additions & 0 deletions frontend/src/ts/elements/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,17 @@ export async function update(
.append(
`<div class="bannedIcon" aria-label="This account has opted out of leaderboards" data-balloon-pos="up"><i class="fas fa-crown"></i></div>`
);

if (where === "profile") {
profileElement
.find(".lbOptOutReminder")
.removeClass("hidden")
.text(
"Note: This account has opted out of the leaderboards, meaning their results aren't verified by the anticheat system and may not be legitimate."
);
} else {
profileElement.find(".lbOptOutReminder").addClass("hidden");
}
}

setTimeout(() => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/ts/pages/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function reset(): void {
<div class="acc">-</div>
</div>
</div>
</div>`);
</div><div class="lbOptOutReminder hidden"></div>`);
}

interface UpdateOptions {
Expand Down
1 change: 1 addition & 0 deletions frontend/static/html/pages/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
</div>
</div>
</div>
<div class="lbOptOutReminder hidden"></div>
</div>
</div>
</div>

0 comments on commit cfed190

Please sign in to comment.