remotes/1693045480750635534/spooky-22
Aevann1 2021-08-30 23:19:10 +02:00
parent 570e947285
commit 8c5310d859
5 changed files with 22 additions and 20 deletions

View File

@ -2,7 +2,9 @@ from sqlalchemy import *
from sqlalchemy.orm import relationship
from files.__main__ import Base, app
from os import environ
site_name = environ.get("SITE_NAME").strip()
class BadgeDef(Base):
@ -22,11 +24,11 @@ class BadgeDef(Base):
@property
def path(self):
return f"/assets/images/badges/{self.icon}"
return f"/assets/images/{site_name}/badges/{self.icon}"
@property
def json_core(self):
data={
return {
"name": self.name,
"description": self.description,
"icon": self.icon

View File

@ -18,7 +18,7 @@ ROLES={
"2": "875569477671067688",
"3": "869434199575236649",
"4": "868140288013664296",
# "5": "880445545771044884",
"5": "880445545771044884",
"8": "868140288013664296",
}

View File

@ -130,10 +130,10 @@ def monthly(v):
grant_awards["shit"] = 10
grant_awards["gold"] = 10
grant_awards["ban"] = 3
# elif u.patron == 5:
# grant_awards["shit"] = 10
# grant_awards["gold"] = 10
# grant_awards["ban"] = 6
elif u.patron == 5:
grant_awards["shit"] = 10
grant_awards["gold"] = 10
grant_awards["ban"] = 6
for name in grant_awards:
@ -254,11 +254,11 @@ def badge_grant_post(v):
grant_awards["shit"] = 10
grant_awards["gold"] = 10
grant_awards["ban"] = 3
# elif badge_id == 25:
# if user.discord_id: add_role(user, "5")
# grant_awards["shit"] = 10
# grant_awards["gold"] = 10
# grant_awards["ban"] = 6
elif badge_id == 25:
if user.discord_id: add_role(user, "5")
grant_awards["shit"] = 10
grant_awards["gold"] = 10
grant_awards["ban"] = 6
if len(grant_awards):

View File

@ -285,11 +285,11 @@ def gumroad(v):
grant_awards["shit"] = 10
grant_awards["gold"] = 10
grant_awards["ban"] = 3
# elif tier == 5:
# if v.discord_id: add_role(v, "5")
# grant_awards["shit"] = 10
# grant_awards["gold"] = 10
# grant_awards["ban"] = 6
elif tier == 5:
if v.discord_id: add_role(v, "5")
grant_awards["shit"] = 10
grant_awards["gold"] = 10
grant_awards["ban"] = 6
_awards = []

View File

@ -60,7 +60,7 @@
{% endfor %}
</div>
<div id="morecomment-{{c.id}}" class="d-block d-md-none mt-2 more-comments text-small">
<a {% if v %}href="{{c.permalink}}"{% else %}href="/logged_out{{c.permalink}}"{% endif %}{% if c.author.is_private %} rel="nofollow"{% endif %}>More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
<a {% if v %}href="{{c.permalink}}?context=5#context"{% else %}href="/logged_out{{c.permalink}}?context=5#context"{% endif %}{% if c.author.is_private %} rel="nofollow"{% endif %}>More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
</div>
{% endif %}
{% endif %}
@ -272,7 +272,7 @@
{% endif %}
<li class="list-inline-item text-muted d-none d-md-inline-block"><a {% if v %}href="{{c.permalink}}?context=5#context"{% else %}href="/logged_out{{c.permalink}}?context=5#context"{% endif %}{% if c.author.is_private %} rel="nofollow"{% endif %}><i class="fas fa-book-open"></i>Context</a></li>
<li class="list-inline-item text-muted d-none d-md-inline-block"><a href="javascript:void(0);" role="button" class="copy-link" data-clipboard-text="{% if 'rdrama' in request.host %}https://ourdrama.fun{{c.permalink}}{% else %}{{c.permalink | full_link}}{% endif %}/?context=5#context"><i class="fas fa-copy"></i>Copy link</a></li>
<li class="list-inline-item text-muted d-none d-md-inline-block"><a href="javascript:void(0);" role="button" class="copy-link" data-clipboard-text="{% if 'rdrama' in request.host %}https://ourdrama.fun{{c.permalink}}?context=5#context{% else %}{{c.permalink | full_link}}{% endif %}/?context=5#context"><i class="fas fa-copy"></i>Copy link</a></li>
{% if v %}
<li class="list-inline-item text-muted d-none d-md-inline-block"><a href="javascript:void(0)" data-toggle="modal" data-target="#reportCommentModal" onclick="report_commentModal('{{c.id}}','{{c.author.username}}',)"><i class="fas fa-flag fa-fw"></i>Report</a></li>
@ -399,7 +399,7 @@
{% endfor %}
</div>
<div id="morecomment-{{c.id}}" class="d-block d-md-none mt-2 more-comments text-small">
<a {% if v %}href="{{c.permalink}}"{% else %}href="/logged_out{{c.permalink}}"{% endif %}{% if c.author.is_private %} rel="nofollow"{% endif %}>More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
<a {% if v %}href="{{c.permalink}}#context"{% else %}href="/logged_out{{c.permalink}}#context"{% endif %}{% if c.author.is_private %} rel="nofollow"{% endif %}>More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
</div>
{% endif %}
{% endif %}