bbbbbbbbbbbbb
This commit is contained in:
parent
bdf96e72e3
commit
33c5e483ae
18 changed files with 47 additions and 25 deletions
File diff suppressed because one or more lines are too long
|
@ -10,6 +10,8 @@ function collapse_comment(comment_id) {
|
|||
element.scrollIntoView()
|
||||
window.scrollBy(0, - 100)
|
||||
}
|
||||
|
||||
document.getElementById(`flaggers-${comment_id}`).classList.add('d-none')
|
||||
};
|
||||
|
||||
function poll_vote_no_v() {
|
||||
|
|
|
@ -33,6 +33,13 @@ def add_role(user, role_name):
|
|||
headers = {"Authorization": f"Bot {BOT_TOKEN}"}
|
||||
requests.put(url, headers=headers, timeout=5)
|
||||
|
||||
@discord_wrap
|
||||
def remove_role(user, role_name):
|
||||
role_id = ROLES[role_name]
|
||||
url = f"https://discordapp.com/api/guilds/{SERVER_ID}/members/{user.discord_id}/roles/{role_id}"
|
||||
headers = {"Authorization": f"Bot {BOT_TOKEN}"}
|
||||
requests.delete(url, headers=headers, timeout=5)
|
||||
|
||||
@discord_wrap
|
||||
def remove_user(user):
|
||||
url=f"https://discordapp.com/api/guilds/{SERVER_ID}/members/{user.discord_id}"
|
||||
|
|
|
@ -345,6 +345,7 @@ def award_post(pid, v):
|
|||
author.patron = 1
|
||||
author.patron_utc += int(time.time()) + 2629746
|
||||
author.procoins += 2500
|
||||
if author.discord_id: add_role(author, "1")
|
||||
if not v.has_badge(103):
|
||||
badge = Badge(user_id=v.id, badge_id=103)
|
||||
g.db.add(badge)
|
||||
|
@ -575,6 +576,7 @@ def award_comment(cid, v):
|
|||
author.patron = 1
|
||||
author.patron_utc += int(time.time()) + 2629746
|
||||
author.procoins += 2500
|
||||
if author.discord_id: add_role(author, "1")
|
||||
if not v.has_badge(103):
|
||||
badge = Badge(user_id=v.id, badge_id=103)
|
||||
g.db.add(badge)
|
||||
|
|
|
@ -171,10 +171,10 @@ def front_all(v, sub=None, subdomain=None):
|
|||
|
||||
if sort == 'bump': t='all'
|
||||
|
||||
try: gt=int(request.values.get("utc_greater_than", 0))
|
||||
try: gt=int(request.values.get("after", 0))
|
||||
except: gt=0
|
||||
|
||||
try: lt=int(request.values.get("utc_less_than", 0))
|
||||
try: lt=int(request.values.get("before", 0))
|
||||
except: lt=0
|
||||
|
||||
if v: subs = v.subs
|
||||
|
@ -204,6 +204,7 @@ def front_all(v, sub=None, subdomain=None):
|
|||
v.patron = 0
|
||||
v.patron_utc = 0
|
||||
send_repeatable_notification(v.id, "Your paypig status has expired!")
|
||||
if v.discord_id: remove_role(v, "1")
|
||||
g.db.add(v)
|
||||
g.db.commit()
|
||||
|
||||
|
@ -491,10 +492,10 @@ def all_comments(v):
|
|||
sort=request.values.get("sort", "new")
|
||||
t=request.values.get("t", defaulttimefilter)
|
||||
|
||||
try: gt=int(request.values.get("utc_greater_than", 0))
|
||||
try: gt=int(request.values.get("after", 0))
|
||||
except: gt=0
|
||||
|
||||
try: lt=int(request.values.get("utc_less_than", 0))
|
||||
try: lt=int(request.values.get("before", 0))
|
||||
except: lt=0
|
||||
|
||||
idlist = comment_idlist(v=v,
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
{% if v %}
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=202"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=33">
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=203"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=33">
|
||||
{% if v.agendaposter %}
|
||||
<style>
|
||||
html {
|
||||
|
@ -39,7 +39,7 @@
|
|||
{% endif %}
|
||||
{% else %}
|
||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=202"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=33">
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=203"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=33">
|
||||
{% endif %}
|
||||
|
||||
</head>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<title>Chat</title>
|
||||
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=202">
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=203">
|
||||
<link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=33">
|
||||
{% if v.css %}
|
||||
<link rel="stylesheet" href="/@{{v.username}}/css">
|
||||
|
@ -66,7 +66,7 @@
|
|||
margin-top: 0.5rem;
|
||||
}
|
||||
#chat-window {
|
||||
max-height: calc(100vh - 190px);
|
||||
max-height: calc(100vh - 255px);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -192,6 +192,7 @@
|
|||
|
||||
{% include "emoji_modal.html" %}
|
||||
{% include "expanded_image_modal.html" %}
|
||||
{% include "mobile_navigation_bar.html" %}
|
||||
|
||||
<script src="/static/assets/js/lozad.js?v=240"></script>
|
||||
<script src="/static/assets/js/lite-youtube.js?v=240"></script>
|
||||
|
|
|
@ -855,7 +855,7 @@
|
|||
{% include "expanded_image_modal.html" %}
|
||||
|
||||
<script src="/static/assets/js/comments+submission_listing.js?v=254"></script>
|
||||
<script src="/static/assets/js/comments.js?v=253"></script>
|
||||
<script src="/static/assets/js/comments.js?v=254"></script>
|
||||
|
||||
<script>
|
||||
{% if p and (not v or v.highlightcomments) %}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<script src="/static/assets/js/bootstrap.js?v=245"></script>
|
||||
{% if v %}
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=202">
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=203">
|
||||
<link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=33">
|
||||
{% if v.agendaposter %}
|
||||
<style>
|
||||
|
@ -32,7 +32,7 @@
|
|||
{% endif %}
|
||||
{% else %}
|
||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=202">
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=203">
|
||||
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=33">
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -83,6 +83,9 @@
|
|||
|
||||
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||
<ul class="navbar-nav ml-auto d-none d-md-flex">
|
||||
<li class="nav-item d-flex align-items-center justify-content-center text-center mx-1">
|
||||
<a class="nav-link" href="/chat/" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Chat"><i class="fas fa-messages"></i></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item d-flex align-items-center justify-content-center text-center mx-1">
|
||||
<a class="nav-link" href="/random/" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Random post"><i class="fas fa-random"></i></a>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
{% block content %}
|
||||
{% if v %}
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=202"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=33">
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=203"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=33">
|
||||
{% if v.agendaposter %}
|
||||
<style>
|
||||
html {
|
||||
|
@ -30,7 +30,7 @@
|
|||
{% endif %}
|
||||
{% else %}
|
||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=202"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=33">
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=203"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=33">
|
||||
{% endif %}
|
||||
|
||||
<div class="row justify-content-around">
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
{% endblock %}
|
||||
|
||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=202">
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=203">
|
||||
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=33">
|
||||
|
||||
</head>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<title>2-Step Login - {{SITE_NAME}}</title>
|
||||
|
||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=202"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=33">
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=203"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=33">
|
||||
|
||||
</head>
|
||||
|
||||
|
|
|
@ -47,6 +47,14 @@
|
|||
</a>
|
||||
</button>
|
||||
{% if v %}
|
||||
<button class="col px-0 btn btn-dead m-0" style="background: None !important; border: None;">
|
||||
<a href="/chat" class="text-decoration-none" role="button">
|
||||
<div class="text-center {% if request.path=='/chat' %}text-primary{% else %}text-muted{% endif %}">
|
||||
<i class="fas fa-messages text-lg"></i>
|
||||
<div class="text-small">Chat</div>
|
||||
</div>
|
||||
</a>
|
||||
</button>
|
||||
<button class="col px-0 mr-3 btn btn-dead m-0" style="background: None !important; border: None;">
|
||||
<a href="/shop" class="text-decoration-none" role="button">
|
||||
<div class="text-center {% if request.path=='/shop' %}text-primary{% else %}text-muted{% endif %}">
|
||||
|
|
|
@ -39,10 +39,10 @@
|
|||
|
||||
{% if v %}
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=202"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=33">
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=203"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=33">
|
||||
{% else %}
|
||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=202"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=33">
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=203"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=33">
|
||||
{% endif %}
|
||||
</head>
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}Sign up - {{SITE_NAME}}{% endif %}</title>
|
||||
|
||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=202"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=33">
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=203"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=33">
|
||||
|
||||
</head>
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %}</title>
|
||||
|
||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=202"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=33">
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=203"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=33">
|
||||
|
||||
</head>
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
{% block stylesheets %}
|
||||
{% if v %}
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=202"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=33">
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=203"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=33">
|
||||
{% if v.agendaposter %}
|
||||
<style>
|
||||
html {
|
||||
|
@ -50,7 +50,7 @@
|
|||
{% endif %}
|
||||
{% else %}
|
||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=202">
|
||||
<link rel="stylesheet" href="/static/assets/css/main.css?v=203">
|
||||
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=33">
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
@ -71,9 +71,7 @@
|
|||
|
||||
<div class="col p-3 py-md-0">
|
||||
|
||||
<h1 class="d-none d-md-block mt-3">Create a post</h1>
|
||||
|
||||
<h2 class="h3 d-md-none mt-5">Create a post</h2>
|
||||
<h2 class="mt-3">Create a post</h2>
|
||||
|
||||
<div class="body">
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue