dsf
This commit is contained in:
parent
2cce840c39
commit
767af21f50
3 changed files with 36 additions and 30 deletions
|
@ -7,6 +7,33 @@ from files.classes.award import *
|
||||||
from .front import frontlist
|
from .front import frontlist
|
||||||
from flask import g, request
|
from flask import g, request
|
||||||
|
|
||||||
|
AWARDS2 = {
|
||||||
|
"ban": {
|
||||||
|
"kind": "ban",
|
||||||
|
"title": "1-Day Ban",
|
||||||
|
"description": "Bans the author for a day.",
|
||||||
|
"icon": "fas fa-gavel",
|
||||||
|
"color": "text-danger",
|
||||||
|
"price": 3000
|
||||||
|
},
|
||||||
|
"grass": {
|
||||||
|
"kind": "grass",
|
||||||
|
"title": "Grass",
|
||||||
|
"description": "Ban the author permanently (must provide a timestamped picture of them touching grass to the admins to get unbanned)",
|
||||||
|
"icon": "fas fa-seedling",
|
||||||
|
"color": "text-success",
|
||||||
|
"price": 10000
|
||||||
|
},
|
||||||
|
"shit": {
|
||||||
|
"kind": "shit",
|
||||||
|
"title": "Shit",
|
||||||
|
"description": "Makes flies swarm a post.",
|
||||||
|
"icon": "fas fa-poop",
|
||||||
|
"color": "text-black-50",
|
||||||
|
"price": 500
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
@app.get("/shop")
|
@app.get("/shop")
|
||||||
@app.get("/settings/shop")
|
@app.get("/settings/shop")
|
||||||
@auth_required
|
@auth_required
|
||||||
|
@ -122,33 +149,6 @@ def shop(v):
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
AWARDS2 = {
|
|
||||||
"ban": {
|
|
||||||
"kind": "ban",
|
|
||||||
"title": "1-Day Ban",
|
|
||||||
"description": "Bans the author for a day.",
|
|
||||||
"icon": "fas fa-gavel",
|
|
||||||
"color": "text-danger",
|
|
||||||
"price": 3000
|
|
||||||
},
|
|
||||||
"grass": {
|
|
||||||
"kind": "grass",
|
|
||||||
"title": "Grass",
|
|
||||||
"description": "Ban the author permanently (must provide a timestamped picture of them touching grass to the admins to get unbanned)",
|
|
||||||
"icon": "fas fa-seedling",
|
|
||||||
"color": "text-success",
|
|
||||||
"price": 10000
|
|
||||||
},
|
|
||||||
"shit": {
|
|
||||||
"kind": "shit",
|
|
||||||
"title": "Shit",
|
|
||||||
"description": "Makes flies swarm a post.",
|
|
||||||
"icon": "fas fa-poop",
|
|
||||||
"color": "text-black-50",
|
|
||||||
"price": 500
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
query = g.db.query(
|
query = g.db.query(
|
||||||
User.id, User.username, User.patron, User.namecolor,
|
User.id, User.username, User.patron, User.namecolor,
|
||||||
AwardRelationship.kind.label('last_award_kind'), func.count(AwardRelationship.id).label('last_award_count')
|
AwardRelationship.kind.label('last_award_kind'), func.count(AwardRelationship.id).label('last_award_count')
|
||||||
|
|
|
@ -100,7 +100,7 @@ def settings_profile_post(v):
|
||||||
updated = True
|
updated = True
|
||||||
v.is_nofollow = request.values.get("nofollow", None) == 'true'
|
v.is_nofollow = request.values.get("nofollow", None) == 'true'
|
||||||
|
|
||||||
if request.values.get("bio"):
|
if request.values.get("bio") or request.files.get('file'):
|
||||||
bio = request.values.get("bio")[:1500]
|
bio = request.values.get("bio")[:1500]
|
||||||
|
|
||||||
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', bio, re.MULTILINE):
|
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', bio, re.MULTILINE):
|
||||||
|
|
|
@ -109,6 +109,13 @@
|
||||||
})()
|
})()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
{% if c.author.bio_html %}
|
||||||
|
{% set bio = c.author.bio_html.replace('src="/assets/images/loading.gif" data-', '') %}
|
||||||
|
{% endif %}
|
||||||
|
<script>
|
||||||
|
console.log({{bio}})
|
||||||
|
</script>
|
||||||
|
|
||||||
<div style="display:none" id="popover-{{c.id}}">
|
<div style="display:none" id="popover-{{c.id}}">
|
||||||
<div class="popover-user-profile" role="tooltip">
|
<div class="popover-user-profile" role="tooltip">
|
||||||
<img class="w-100 h-64 object-cover" src="{{c.author.banner_url}}">
|
<img class="w-100 h-64 object-cover" src="{{c.author.banner_url}}">
|
||||||
|
@ -119,7 +126,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="px-3">
|
<div class="px-3">
|
||||||
<span class="text-black">{% if c.author.bio_html %}{{c.author.bio_html.replace('src="/assets/images/loading.gif" data-', '') | safe}}{% endif %}</span>
|
<span class="text-black">{% if c.author.bio_html %}{{bio | safe}}{% endif %}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="border-top d-flex align-items-center px-2 py-3 gap-3 smol">
|
<div class="border-top d-flex align-items-center px-2 py-3 gap-3 smol">
|
||||||
<span>
|
<span>
|
||||||
|
@ -153,7 +160,6 @@
|
||||||
{% set replies=c.replies %}
|
{% set replies=c.replies %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{% if (c.is_banned or c.deleted_utc > 0 or c.is_blocking or c.is_blocked) and not (v and v.admin_level>0) and not (v and v.id==c.author_id) %}
|
{% if (c.is_banned or c.deleted_utc > 0 or c.is_blocking or c.is_blocked) and not (v and v.admin_level>0) and not (v and v.id==c.author_id) %}
|
||||||
|
|
||||||
<div id="comment-{{c.id}}" class="comment">
|
<div id="comment-{{c.id}}" class="comment">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue