forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2021-08-02 09:00:38 +02:00
parent 5e27a120ca
commit ef1e3f2b4d
9 changed files with 18 additions and 24 deletions

View File

@ -483,20 +483,14 @@ def unfollow_user(username, v):
return "", 204 return "", 204
@app.route("/@<username>/pic/profile") @app.route("/uid/<id>/pic/profile")
@limiter.exempt @limiter.exempt
def user_profile(username): def user_profile_uid(id):
x = get_user(username) try: id = int(id)
return redirect(x.profile_url)
@app.route("/uid/<uid>/pic/profile")
@limiter.exempt
def user_profile_uid(uid):
try: uid = int(uid)
except: except:
try: uid = int(uid, 36) try: id = int(id, 36)
except: abort(404) except: abort(404)
x=get_account(uid) x=get_account(id)
return redirect(x.profile_url) return redirect(x.profile_url)

View File

@ -15,7 +15,7 @@
</thead> </thead>
{% for user in badmins %} {% for user in badmins %}
<tr> <tr>
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/@{{user.username}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td> <td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
<td style="font-weight:bold; text-align:right;">{{user.dramacoins}}</td> <td style="font-weight:bold; text-align:right;">{{user.dramacoins}}</td>
</tr> </tr>
{% endfor %} {% endfor %}

View File

@ -13,9 +13,9 @@
{% for user in users %} {% for user in users %}
<tr> <tr>
<td style="font-weight:bold;">{{users.index(user)+1}}</td> <td style="font-weight:bold;">{{users.index(user)+1}}</td>
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/@{{user.username}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td> <td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
<td style="font-weight:bold;">{% if user.ban_reason %}{{user.ban_reason}}{% endif %}</td> <td style="font-weight:bold;">{% if user.ban_reason %}{{user.ban_reason}}{% endif %}</td>
<td>{% if user.banned_by %}<a {% if user.banned_by.animatedname %}class="{% if user.banned_by.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.banned_by.namecolor}}; font-weight:bold;" href="/@{{user.banned_by.username}}"><img src="/@{{user.banned_by.username}}/pic/profile" class="profile-pic-20 mr-1">{{user.banned_by.username}}</a>{% endif %}</td> <td>{% if user.banned_by %}<a {% if user.banned_by.animatedname %}class="{% if user.banned_by.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.banned_by.namecolor}}; font-weight:bold;" href="/@{{user.banned_by.username}}"><img src="/uid/{{user.banned_by.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.banned_by.username}}</a>{% endif %}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>

View File

@ -13,7 +13,7 @@
{% for user in users %} {% for user in users %}
<tr> <tr>
<td style="font-weight: bold">{{users.index(user)+1}}</td> <td style="font-weight: bold">{{users.index(user)+1}}</td>
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/@{{user.username}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td> <td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>

View File

@ -17,7 +17,7 @@
{% for user in users1 %} {% for user in users1 %}
<tr> <tr>
<td style="font-weight:bold;">{{users1.index(user)+1}}</td> <td style="font-weight:bold;">{{users1.index(user)+1}}</td>
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/@{{user.username}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td> <td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
<td style="font-weight:bold; text-align:right;">{{user.dramacoins}}</td> <td style="font-weight:bold; text-align:right;">{{user.dramacoins}}</td>
</tr> </tr>
{% endfor %} {% endfor %}
@ -42,7 +42,7 @@
{% for user in users2 %} {% for user in users2 %}
<tr> <tr>
<td style="font-weight:bold;">{{users2.index(user)+1}}</td> <td style="font-weight:bold;">{{users2.index(user)+1}}</td>
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/@{{user.username}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td> <td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
<td style="font-weight:bold; text-align:right;">{{user.stored_subscriber_count}}</td> <td style="font-weight:bold; text-align:right;">{{user.stored_subscriber_count}}</td>
</tr> </tr>
{% endfor %} {% endfor %}
@ -67,7 +67,7 @@
{% for user in users3 %} {% for user in users3 %}
<tr> <tr>
<td style="font-weight:bold;">{{users3.index(user)+1}}</td> <td style="font-weight:bold;">{{users3.index(user)+1}}</td>
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/@{{user.username}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td> <td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
<td style="font-weight:bold; text-align:right;">{{user.post_count}}</td> <td style="font-weight:bold; text-align:right;">{{user.post_count}}</td>
</tr> </tr>
{% endfor %} {% endfor %}
@ -92,7 +92,7 @@
{% for user in users4 %} {% for user in users4 %}
<tr> <tr>
<td style="font-weight:bold;">{{users4.index(user)+1}}</td> <td style="font-weight:bold;">{{users4.index(user)+1}}</td>
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold; fonts" href="/@{{user.username}}"><img src="/@{{user.username}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td> <td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold; fonts" href="/@{{user.username}}"><img src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
<td style="font-weight:bold; text-align:right;">{{user.comment_count}}</td> <td style="font-weight:bold; text-align:right;">{{user.comment_count}}</td>
</tr> </tr>
{% endfor %} {% endfor %}

View File

@ -13,7 +13,7 @@
{% for user in users %} {% for user in users %}
<tr> <tr>
<td style="font-weight:bold;">{{users.index(user)+1}}</td> <td style="font-weight:bold;">{{users.index(user)+1}}</td>
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/@{{user.username}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td> <td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
<td><img style="width: 32px; height: 32px" src="/assets/images/badges/patron-{{user.patron}}.gif"></td> <td><img style="width: 32px; height: 32px" src="/assets/images/badges/patron-{{user.patron}}.gif"></td>

View File

@ -13,7 +13,7 @@
{% for user in users %} {% for user in users %}
<tr> <tr>
<td style="font-weight: bold">{{users.index(user)+1}}</td> <td style="font-weight: bold">{{users.index(user)+1}}</td>
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/@{{user.username}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td> <td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>

View File

@ -12,7 +12,7 @@
</thead> </thead>
{% for view in viewers %} {% for view in viewers %}
<tr> <tr>
<td style="font-weight: bold"><a {% if view.viewer.animatedname %}class="{% if view.viewer.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color: #{{view.viewer.namecolor}}" href="/@{{view.viewer.username}}"><img src="/@{{view.viewer.username}}/pic/profile" class="profile-pic-20 mr-1">{{view.viewer.username}}</a></td> <td style="font-weight: bold"><a {% if view.viewer.animatedname %}class="{% if view.viewer.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color: #{{view.viewer.namecolor}}" href="/@{{view.viewer.username}}"><img src="/uid/{{view.viewer.id}}/pic/profile" class="profile-pic-20 mr-1">{{view.viewer.username}}</a></td>
<td style="font-weight: bold">{{view.last_view_string}}</td> <td style="font-weight: bold">{{view.last_view_string}}</td>
</tr> </tr>
{% endfor %} {% endfor %}

View File

@ -28,7 +28,7 @@
<thead class="bg-primary text-white"><tr><th>User</th></tr></thead> <thead class="bg-primary text-white"><tr><th>User</th></tr></thead>
{% for vote in ups %} {% for vote in ups %}
<tr><td><a {% if vote.user.animatedname %}class="{% if vote.user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{vote.user.namecolor}}; font-weight:bold;" href="/@{{vote.user.username}}"><img src="/@{{vote.user.username}}/pic/profile" class="profile-pic-20 mr-1">{{vote.user.username}}</a></td></tr> <tr><td><a {% if vote.user.animatedname %}class="{% if vote.user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{vote.user.namecolor}}; font-weight:bold;" href="/@{{vote.user.username}}"><img src="/uid/{{vote.user.id}}/pic/profile" class="profile-pic-20 mr-1">{{vote.user.username}}</a></td></tr>
{% endfor %} {% endfor %}
</table> </table>
@ -37,7 +37,7 @@
<thead class="bg-primary text-white"><tr><th>User</th></tr></thead> <thead class="bg-primary text-white"><tr><th>User</th></tr></thead>
{% for vote in downs %} {% for vote in downs %}
<tr><td><a {% if vote.user.animatedname %}class="{% if vote.user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{vote.user.namecolor}}; font-weight:bold;" href="/@{{vote.user.username}}"><img src="/@{{vote.user.username}}/pic/profile" class="profile-pic-20 mr-1">{{vote.user.username}}</a></td></tr> <tr><td><a {% if vote.user.animatedname %}class="{% if vote.user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{vote.user.namecolor}}; font-weight:bold;" href="/@{{vote.user.username}}"><img src="/uid/{{vote.user.id}}/pic/profile" class="profile-pic-20 mr-1">{{vote.user.username}}</a></td></tr>
{% endfor %} {% endfor %}
</table> </table>