Change leaderboard to use id link vs username since page is cached and username can change (#216)

Found by @Grue

Co-authored-by: Chuck <dude@bussy.com>
Reviewed-on: #216
Co-authored-by: top <top@noreply.fsdfsd.net>
Co-committed-by: top <top@noreply.fsdfsd.net>
pull/217/head
top 2023-11-06 11:50:10 +00:00 committed by Aevann
parent f18055838c
commit 23ceccddfc
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@
<td>{{position_no}}</td>
<td>{% include "user_in_table.html" %}</td>
{% if user_relative_url is not none %}
<td><a href="/@{{user.username}}/{{user_relative_url}}">{{"{:,}".format(value)}}</a></td>
<td><a href="/id/{{user.id}}">{{"{:,}".format(value)}}</a></td>
{% else %}
<td>{{"{:,}".format(value)}}</td>
{% endif %}

View File

@ -1,7 +1,7 @@
{% if user %}
{% if can_see(v, user) %}
{%- include 'admin/shadowbanned_tooltip.html' -%}
<a class="unbreakable" data-sort-key="{{user.username.lower()}}" style="color:#{{user.name_color}};font-weight:bold" href="/@{{user.username}}">
<a class="unbreakable" data-sort-key="{{user.username.lower()}}" style="color:#{{user.name_color}};font-weight:bold" href="/id/{{user.id}}">
<div class="profile-pic-20-wrapper mb-2">
<img loading="lazy" src="{{user.profile_url}}" class="pp20">
{% if user.hat_active(v)[0] -%}