gf
This commit is contained in:
parent
ce47392cfd
commit
6ec45a89d7
18 changed files with 25 additions and 30 deletions
|
@ -4015,3 +4015,9 @@ img.emoji {
|
|||
-webkit-animation: None !important;
|
||||
animation: None !important;
|
||||
}
|
||||
|
||||
.patron {
|
||||
padding: 5px 10px 10px 10px !important;
|
||||
border-radius: 10px !important;
|
||||
color: white !important;
|
||||
}
|
|
@ -32,7 +32,6 @@ class User(Base, Stndrd, Age_times):
|
|||
profileurl = Column(String)
|
||||
bannerurl = Column(String)
|
||||
patron = Column(Integer, default=0)
|
||||
animatedname = Column(Boolean, default=False)
|
||||
email = Column(String)
|
||||
css = deferred(Column(String))
|
||||
profilecss = deferred(Column(String))
|
||||
|
|
|
@ -182,7 +182,6 @@ def badge_grant_post(v):
|
|||
|
||||
if badge_id in [21,22,23,24,28]:
|
||||
user.patron = int(str(badge_id)[-1])
|
||||
user.animatedname = True
|
||||
|
||||
grant_awards = {}
|
||||
|
||||
|
|
|
@ -50,14 +50,6 @@ def settings_profile_post(v):
|
|||
updated = True
|
||||
v.is_private = request.values.get("private", None) == 'true'
|
||||
|
||||
if request.values.get("animatedname", v.animatedname) != v.animatedname:
|
||||
if v.animatedname == False:
|
||||
users = g.db.query(User.id).options(lazyload('*')).order_by(User.coins.desc()).limit(25).all()
|
||||
users = [x[0] for x in users]
|
||||
if v.id not in users: return {"error": "You must be in the top 25 leaderboard or be a patron to apply an animated name!"}, 403
|
||||
updated = True
|
||||
v.animatedname = request.values.get("animatedname", None) == 'true'
|
||||
|
||||
if request.values.get("nofollow", v.is_nofollow) != v.is_nofollow:
|
||||
updated = True
|
||||
v.is_nofollow = request.values.get("nofollow", None) == 'true'
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</thead>
|
||||
{% for user in badmins %}
|
||||
<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="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td><a {% if user.patron %}class="patron"{% endif %} style="color:#{{user.namecolor}}; {% if user.patron %}background-color:#{{user.namecolor}};{% endif %} 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.coins}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
{% for user in users %}
|
||||
<tr>
|
||||
<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="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td><a {% if user.patron %}class="patron"{% endif %} style="color:#{{user.namecolor}}; {% if user.patron %}background-color:#{{user.namecolor}};{% endif %} 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>{% 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>
|
||||
<td>{% if user.banned_by %}<a {% if user.banned_by.patron %}class="patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.banned_by.namecolor}}; {% if user.banned_by.patron %}background-color:#{{user.banned_by.namecolor}};{% endif %} 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>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
</thead>
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="font-weight:bold;color:#{{user.namecolor}};" href="/@{{user.username}}">{{user.username}}</a></td>
|
||||
<td><a {% if targets[loop.index-1].animatedname %}class="{% if targets[loop.index-1].patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="font-weight:bold;color:#{{targets[loop.index-1].namecolor}};" href="/@{{targets[loop.index-1].username}}">{{targets[loop.index-1].username}}</a></td>
|
||||
<td><a {% if user.patron %}class="patron"{% endif %} style="font-weight:bold;color:#{{user.namecolor}}; {% if user.patron %}background-color:#{{user.namecolor}};{% endif %}" href="/@{{user.username}}">{{user.username}}</a></td>
|
||||
<td><a {% if targets[loop.index-1].patron %}class="patron"{% endif %} style="font-weight:bold;color:#{{targets[loop.index-1].namecolor}}; {% if targets[loop.index-1].patron %}background-color:#{{targets[loop.index-1].namecolor}};{% endif %}" href="/@{{targets[loop.index-1].username}}">{{targets[loop.index-1].username}}</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
{% if c.is_blocking %}<i class="fas fa-user-minus text-warning" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="{% if v and v.admin_level >= 2 %}You're blocking this user, but you can see this comment because {{'it\'s an admin comment' if c.distinguish_level else 'you\'re an admin'}}.{% else %}Comment author is banned{% endif %}"></i> {% endif %}
|
||||
{% if c.is_blocked %}<i class="fas fa-user-minus text-danger" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="This user is blocking you, but you can see this comment because {{'it\'s an admin comment' if c.distinguish_level else 'you\'re an admin'}}."></i> {% endif %}
|
||||
|
||||
<a {% if c.author.animatedname %}class="{% if c.author.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{c.author.namecolor}}; font-size:12px; font-weight:bold;" href="/@{{c.author.username}}"><img src="{{c.author.profile_url}}" class="profile-pic-25 mr-2"/>{{c.author.username}}</a>{% if c.author.customtitle %} <bdi style="color: #{{c.author.titlecolor}}"> {{c.author.customtitle | safe}}</bdi>{% endif %}
|
||||
<a {% if c.author.patron %}class="patron"{% endif %} style="color:#{{c.author.namecolor}}; {% if c.author.patron %}background-color:#{{c.author.namecolor}};{% endif %} font-size:12px; font-weight:bold;" href="/@{{c.author.username}}"><img src="{{c.author.profile_url}}" class="profile-pic-25 mr-2"/>{{c.author.username}}</a>{% if c.author.customtitle %} <bdi style="color: #{{c.author.titlecolor}}"> {{c.author.customtitle | safe}}</bdi>{% endif %}
|
||||
|
||||
<span id="timestamp-{{c.id}}" data-toggle="tooltip" data-placement="bottom" title="" class="time-stamp"> {{c.age_string}}</span>
|
||||
{% if c.edited_utc %}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
{% for user in users %}
|
||||
<tr>
|
||||
<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="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td><a {% if user.patron %}class="patron"{% endif %} style="color:#{{user.namecolor}}; {% if user.patron %}background-color:#{{user.namecolor}};{% endif %} font-weight:bold;" href="/@{{user.username}}"><img src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
<div class="d-flex">
|
||||
<div><img src="{{v.profile_url}}" class="profile-pic-35"></div>
|
||||
<div class="text-left pl-2">
|
||||
<div style="color: #{{v.namecolor}}" class="text-small font-weight-bold {% if v.animatedname %}{% if v.patron %}patron{% else %}leaderboard{% endif %}{% endif %}">{{v.username}}</div>
|
||||
<div style="color: #{{v.namecolor}}" class="text-small font-weight-bold {% if v.patron %}patron{% endif %}">{{v.username}}</div>
|
||||
<div class="text-small-extra text-purple"><i class="fad fa-coins mr-1"></i><span id="user-coins-amount">{{v.coins}}</span> {{"COINS_NAME" | app_config}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
{% for user in users1 %}
|
||||
<tr>
|
||||
<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="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td><a {% if user.patron %}class="patron"{% endif %} style="color:#{{user.namecolor}}; {% if user.patron %}background-color:#{{user.namecolor}};{% endif %} 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.coins}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
@ -42,7 +42,7 @@
|
|||
{% for user in users2 %}
|
||||
<tr>
|
||||
<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="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td><a {% if user.patron %}class="patron"{% endif %} style="color:#{{user.namecolor}}; {% if user.patron %}background-color:#{{user.namecolor}};{% endif %} 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>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
@ -67,7 +67,7 @@
|
|||
{% for user in users3 %}
|
||||
<tr>
|
||||
<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="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td><a {% if user.patron %}class="patron"{% endif %} style="color:#{{user.namecolor}}; {% if user.patron %}background-color:#{{user.namecolor}};{% endif %} 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>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
@ -92,7 +92,7 @@
|
|||
{% for user in users4 %}
|
||||
<tr>
|
||||
<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="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td><a {% if user.patron %}class="patron"{% endif %} style="color:#{{user.namecolor}}; {% if user.patron %}background-color:#{{user.namecolor}};{% endif %} 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>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
{% for user in users %}
|
||||
<tr>
|
||||
<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="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td><a {% if user.patron %}class="patron"{% endif %} style="color:#{{user.namecolor}}; {% if user.patron %}background-color:#{{user.namecolor}};{% endif %} 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>
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
{% for user in users %}
|
||||
<tr>
|
||||
<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="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td><a {% if user.patron %}class="patron"{% endif %} style="color:#{{user.namecolor}}; {% if user.patron %}background-color:#{{user.namecolor}};{% endif %} font-weight:bold;" href="/@{{user.username}}"><img src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
|
|
@ -219,7 +219,7 @@
|
|||
{% if p.over_18 %}<span class="badge badge-danger text-small-extra mr-1">+18</span>{% endif %}
|
||||
{% if p.private %}<span class="badge border-warning border-1 text-small-extra">unlisted</span>{% endif %}
|
||||
{% if p.active_flags %}<a class="btn btn-primary" href="javascript:void(0)" style="padding:1px 5px; font-size:10px;" onclick="document.getElementById('flaggers').classList.toggle('d-none')">{{p.active_flags}} Reports</a>{% endif %}
|
||||
<a {% if p.author.animatedname %}class="{% if p.author.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} href="{{p.author.url}}" style="color: #{{p.author.namecolor}}; font-weight: bold;" class="user-name"> <img src="{{p.author.profile_url}}" class="profile-pic-25 mr-2"/>{{p.author.username}}</a>{% if p.author.customtitle %} <bdi style="color: #{{p.author.titlecolor}}"> {{p.author.customtitle | safe}}</bdi>{% endif %}
|
||||
<a {% if p.author.patron %}class="patron"{% endif %} href="{{p.author.url}}" style="color: #{{p.author.namecolor}}; font-weight: bold;" class="user-name"> <img src="{{p.author.profile_url}}" class="profile-pic-25 mr-2"/>{{p.author.username}}</a>{% if p.author.customtitle %} <bdi style="color: #{{p.author.titlecolor}}"> {{p.author.customtitle | safe}}</bdi>{% endif %}
|
||||
<span data-toggle="tooltip" data-placement="bottom" id="timestamp" title=""> {{p.age_string}}</span>
|
||||
({% if p.realurl(v) %}<a href="/search/posts/?q=domain%3A{{p.domain}}&sort=new&t=all" {% if v and v.newtabexternal %}target="_blank"{% endif %}>{{p.domain}}</a>{% else %}text post{% endif %})
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
{% if p.is_blocked %}<i class="fas fa-user-minus text-danger" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="This user is blocking you."></i>{% endif %}
|
||||
{% if p.private %}<span class="badge border-warning border-1 text-small-extra">unlisted</span>{% endif %}
|
||||
{% if p.active_flags %}<a class="btn btn-primary" href="javascript:void(0)" style="padding:1px 5px; font-size:10px;" onclick="document.getElementById('flaggers-{{p.id}}').classList.toggle('d-none')">{{p.active_flags}} Reports</a>{% endif %}
|
||||
<a {% if p.author.animatedname %}class="{% if p.author.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} href="{{p.author.url}}" style="color: #{{p.author.namecolor}}; font-weight: bold;" class="user-name"><img src="{{p.author.profile_url}}" class="profile-pic-25 mr-2"/>{{p.author.username}}</a>{% if p.author.customtitle %}<bdi style="color: #{{p.author.titlecolor}}"> {{p.author.customtitle | safe}}</bdi>{% endif %}
|
||||
<a {% if p.author.patron %}class="patron"{% endif %} href="{{p.author.url}}" style="color: #{{p.author.namecolor}}; font-weight: bold;" class="user-name"><img src="{{p.author.profile_url}}" class="profile-pic-25 mr-2"/>{{p.author.username}}</a>{% if p.author.customtitle %}<bdi style="color: #{{p.author.titlecolor}}"> {{p.author.customtitle | safe}}</bdi>{% endif %}
|
||||
<span data-toggle="tooltip" data-placement="bottom" id="timestamp-{{p.id}}" title=""> {{p.age_string}}</span>
|
||||
|
||||
({% if p.realurl(v) %}<a href="/search/posts/?q=domain%3A{{p.domain}}&sort=new&t=all" target="_blank">{{p.domain}}</a>{% else %}text post{% endif %})
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</thead>
|
||||
{% for view in viewers %}
|
||||
<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="/uid/{{view.viewer.id}}/pic/profile" class="profile-pic-20 mr-1">{{view.viewer.username}}</a></td>
|
||||
<td style="font-weight: bold"><a {% if view.viewer.patron %}class="patron"{% 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>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<thead class="bg-primary text-white"><tr><th>User</th></tr></thead>
|
||||
|
||||
{% 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="/uid/{{vote.user.id}}/pic/profile" class="profile-pic-20 mr-1">{{vote.user.username}}</a></td></tr>
|
||||
<tr><td><a {% if vote.user.patron %}class="patron"{% endif %} style="color:#{{vote.user.namecolor}}; {% if vote.user.patron %}background-color:#{{vote.user.namecolor}};{% endif %} 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 %}
|
||||
</table>
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
<thead class="bg-primary text-white"><tr><th>User</th></tr></thead>
|
||||
|
||||
{% 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="/uid/{{vote.user.id}}/pic/profile" class="profile-pic-20 mr-1">{{vote.user.username}}</a></td></tr>
|
||||
<tr><td><a {% if vote.user.patron %}class="patron"{% endif %} style="color:#{{vote.user.namecolor}}; {% if vote.user.patron %}background-color:#{{vote.user.namecolor}};{% endif %} 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 %}
|
||||
</table>
|
||||
|
||||
|
|
|
@ -1039,7 +1039,6 @@ CREATE TABLE public.users (
|
|||
agendaposter boolean,
|
||||
agendaposter_expires_utc integer DEFAULT 0,
|
||||
resized boolean,
|
||||
animatedname boolean,
|
||||
suicide_utc integer,
|
||||
post_count integer,
|
||||
comment_count integer,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue