remotes/1693045480750635534/spooky-22
Aevann1 2021-11-01 20:25:10 +02:00
parent 198bffd2bd
commit 20306e5d12
19 changed files with 82 additions and 72 deletions

View File

@ -53,7 +53,6 @@ SLURS = {
"tenant": "renthog",
"renter": "rentoid",
"autistic": "neurodivergent",
"anime": "p-dophilic japanese cartoons",
"holohoax": "i tried to claim the Holocaust didn't happen because I am a pencil-dicked imbecile and the word filter caught me lol",
"groomercord": "discord (actually a pretty cool service)",
"pedocord": "discord (actually a pretty cool service)",
@ -62,8 +61,6 @@ SLURS = {
"gamer": "g*mer",
"journalist": "journ*list",
"journalism": "journ*lism",
"buttcheeks": "bulva",
"asscheeks": "bulva",
"wuhan flu": "SARS-CoV-2 syndemic",
"china flu": "SARS-CoV-2 syndemic",
"china virus": "SARS-CoV-2 syndemic",
@ -150,7 +147,7 @@ if SITE_NAME == "Drama":
"shit": {
"kind": "shit",
"title": "Shit",
"description": "Makes flies swarm a post.",
"description": "Makes flies swarm the post.",
"icon": "fas fa-poop",
"color": "text-black-50",
"price": 500
@ -158,7 +155,7 @@ if SITE_NAME == "Drama":
"fireflies": {
"kind": "fireflies",
"title": "Fireflies",
"description": "Puts fireflies on the post.",
"description": "Makes fireflies swarm the post.",
"icon": "fas fa-sparkles",
"color": "text-warning",
"price": 500
@ -174,7 +171,7 @@ if SITE_NAME == "Drama":
"pin": {
"kind": "pin",
"title": "1-Hour Pin",
"description": "Pins the post.",
"description": "Pins the post/comment.",
"icon": "fas fa-thumbtack fa-rotate--45",
"color": "text-warning",
"price": 750
@ -182,7 +179,7 @@ if SITE_NAME == "Drama":
"unpin": {
"kind": "unpin",
"title": "1-Hour Unpin",
"description": "Removes 1 hour from the pin duration of the post.",
"description": "Removes 1 hour from the pin duration of the post/comment.",
"icon": "fas fa-thumbtack fa-rotate--45",
"color": "text-black",
"price": 1000
@ -257,7 +254,7 @@ else:
"shit": {
"kind": "shit",
"title": "Shit",
"description": "Makes flies swarm a post.",
"description": "Makes flies swarm the post.",
"icon": "fas fa-poop",
"color": "text-black-50",
"price": 500
@ -265,7 +262,7 @@ else:
"fireflies": {
"kind": "fireflies",
"title": "Fireflies",
"description": "Puts fireflies on the post.",
"description": "Makes fireflies swarm the post.",
"icon": "fas fa-sparkles",
"color": "text-warning",
"price": 500
@ -281,7 +278,7 @@ else:
"pin": {
"kind": "pin",
"title": "1-Hour Pin",
"description": "Pins the post.",
"description": "Pins the post/comment.",
"icon": "fas fa-thumbtack fa-rotate--45",
"color": "text-warning",
"price": 750
@ -289,7 +286,7 @@ else:
"unpin": {
"kind": "unpin",
"title": "1-Hour Unpin",
"description": "Removes 1 hour from the pin duration of the post.",
"description": "Removes 1 hour from the pin duration of the post/comment.",
"icon": "fas fa-thumbtack fa-rotate--45",
"color": "text-black",
"price": 1000

View File

@ -357,13 +357,13 @@ def badge_grant_post(v):
except: abort(400)
if user.has_badge(badge_id):
g.db.query(Badge).options(lazyload('*')).filter_by(badge_id=badge_id, user_id=user.id,).delete()
g.db.delete(g.db.query(Badge).options(lazyload('*')).filter_by(badge_id=badge_id, user_id=user.id))
g.db.commit()
return redirect("/admin/badge_grant")
if badge_id == 16:
badge = user.has_badge(17)
if badge: badge.delete()
if badge: g.db.delete(badge)
elif badge_id == 17 and user.has_badge(16): abort(403)

View File

@ -8,6 +8,14 @@ from .front import frontlist
from flask import g, request
from files.helpers.sanitize import filter_title
discounts = {
69: 0.02,
70: 0.04,
71: 0.06,
72: 0.08,
73: 0.10,
}
AWARDS2 = {
"ban": {
"kind": "ban",
@ -20,7 +28,7 @@ AWARDS2 = {
"fireflies": {
"kind": "fireflies",
"title": "Fireflies",
"description": "Puts fireflies on the post.",
"description": "Makes fireflies swarm the post.",
"icon": "fas fa-sparkles",
"color": "text-warning",
"price": 500
@ -28,7 +36,7 @@ AWARDS2 = {
"shit": {
"kind": "shit",
"title": "Shit",
"description": "Makes flies swarm a post.",
"description": "Makes flies swarm the post.",
"icon": "fas fa-poop",
"color": "text-black-50",
"price": 500
@ -44,7 +52,7 @@ def shop(v):
"shit": {
"kind": "shit",
"title": "Shit",
"description": "Makes flies swarm a post.",
"description": "Makes flies swarm the post.",
"icon": "fas fa-poop",
"color": "text-black-50",
"owned": 0,
@ -53,7 +61,7 @@ def shop(v):
"fireflies": {
"kind": "fireflies",
"title": "Fireflies",
"description": "Puts fireflies on the post.",
"description": "Makes fireflies swarm the post.",
"icon": "fas fa-sparkles",
"color": "text-warning",
"owned": 0,
@ -71,7 +79,7 @@ def shop(v):
"pin": {
"kind": "pin",
"title": "1-Hour Pin",
"description": "Pins the post.",
"description": "Pins the post/comment.",
"icon": "fas fa-thumbtack fa-rotate--45",
"color": "text-warning",
"owned": 0,
@ -80,7 +88,7 @@ def shop(v):
"unpin": {
"kind": "unpin",
"title": "1-Hour Unpin",
"description": "Removes 1 hour from the pin duration of the post.",
"description": "Removes 1 hour from the pin duration of the post/comment.",
"icon": "fas fa-thumbtack fa-rotate--45",
"color": "text-black",
"owned": 0,
@ -164,7 +172,7 @@ def shop(v):
"shit": {
"kind": "shit",
"title": "Shit",
"description": "Makes flies swarm a post.",
"description": "Makes flies swarm the post.",
"icon": "fas fa-poop",
"color": "text-black-50",
"owned": 0,
@ -173,7 +181,7 @@ def shop(v):
"fireflies": {
"kind": "fireflies",
"title": "Fireflies",
"description": "Puts fireflies on the post.",
"description": "Makes fireflies swarm the post.",
"icon": "fas fa-sparkles",
"color": "text-warning",
"owned": 0,
@ -191,7 +199,7 @@ def shop(v):
"pin": {
"kind": "pin",
"title": "1-Hour Pin",
"description": "Pins the post.",
"description": "Pins the post/comment.",
"icon": "fas fa-thumbtack fa-rotate--45",
"color": "text-warning",
"owned": 0,
@ -200,7 +208,7 @@ def shop(v):
"unpin": {
"kind": "unpin",
"title": "1-Hour Unpin",
"description": "Removes 1 hour from the pin duration of the post.",
"description": "Removes 1 hour from the pin duration of the post/comment.",
"icon": "fas fa-thumbtack fa-rotate--45",
"color": "text-black",
"owned": 0,
@ -236,7 +244,7 @@ def shop(v):
else: discount = 1
for badge in [69,70,71,72,73]:
if v.has_badge(badge): discount -= 0.02
if v.has_badge(badge): discount -= discounts[badge]
for val in AWARDS.values():
val["price"] = int(val["price"]*discount)
@ -253,7 +261,7 @@ def buy(v, award):
"shit": {
"kind": "shit",
"title": "Shit",
"description": "Makes flies swarm a post.",
"description": "Makes flies swarm the post.",
"icon": "fas fa-poop",
"color": "text-black-50",
"price": 500
@ -261,7 +269,7 @@ def buy(v, award):
"fireflies": {
"kind": "fireflies",
"title": "Fireflies",
"description": "Puts fireflies on the post.",
"description": "Makes fireflies swarm the post.",
"icon": "fas fa-sparkles",
"color": "text-warning",
"price": 500
@ -277,7 +285,7 @@ def buy(v, award):
"pin": {
"kind": "pin",
"title": "1-Hour Pin",
"description": "Pins the post.",
"description": "Pins the post/comment.",
"icon": "fas fa-thumbtack fa-rotate--45",
"color": "text-warning",
"price": 750
@ -285,7 +293,7 @@ def buy(v, award):
"unpin": {
"kind": "unpin",
"title": "1-Hour Unpin",
"description": "Removes 1 hour from the pin duration of the post.",
"description": "Removes 1 hour from the pin duration of the post/comment.",
"icon": "fas fa-thumbtack fa-rotate--45",
"color": "text-black",
"price": 1000
@ -360,7 +368,7 @@ def buy(v, award):
"shit": {
"kind": "shit",
"title": "Shit",
"description": "Makes flies swarm a post.",
"description": "Makes flies swarm the post.",
"icon": "fas fa-poop",
"color": "text-black-50",
"price": 500
@ -368,7 +376,7 @@ def buy(v, award):
"fireflies": {
"kind": "fireflies",
"title": "Fireflies",
"description": "Puts fireflies on the post.",
"description": "Makes fireflies swarm the post.",
"icon": "fas fa-sparkles",
"color": "text-warning",
"price": 500
@ -384,7 +392,7 @@ def buy(v, award):
"pin": {
"kind": "pin",
"title": "1-Hour Pin",
"description": "Pins the post.",
"description": "Pins the post/comment.",
"icon": "fas fa-thumbtack fa-rotate--45",
"color": "text-warning",
"price": 750
@ -392,7 +400,7 @@ def buy(v, award):
"unpin": {
"kind": "unpin",
"title": "1-Hour Unpin",
"description": "Removes 1 hour from the pin duration of the post.",
"description": "Removes 1 hour from the pin duration of the post/comment.",
"icon": "fas fa-thumbtack fa-rotate--45",
"color": "text-black",
"price": 1000
@ -426,7 +434,7 @@ def buy(v, award):
else: discount = 1
for badge in [69,70,71,72,73]:
if v.has_badge(badge): discount -= 0.02
if v.has_badge(badge): discount -= discounts[badge]
price = int(price*discount)
@ -441,22 +449,22 @@ def buy(v, award):
new_badge = Badge(badge_id=73, user_id=v.id)
g.db.add(new_badge)
old_badge = v.has_badge(72)
if old_badge: old_badge.delete()
if old_badge: g.db.delete(old_badge)
elif v.coins_spent >= 500000 and not v.has_badge(72):
new_badge = Badge(badge_id=72, user_id=v.id)
g.db.add(new_badge)
old_badge = v.has_badge(71)
if old_badge: old_badge.delete()
if old_badge: g.db.delete(old_badge)
elif v.coins_spent >= 250000 and not v.has_badge(71):
new_badge = Badge(badge_id=71, user_id=v.id)
g.db.add(new_badge)
old_badge = v.has_badge(70)
if old_badge: old_badge.delete()
if old_badge: g.db.delete(old_badge)
elif v.coins_spent >= 100000 and not v.has_badge(70):
new_badge = Badge(badge_id=70, user_id=v.id)
g.db.add(new_badge)
old_badge = v.has_badge(69)
if old_badge: old_badge.delete()
if old_badge: g.db.delete(old_badge)
elif v.coins_spent >= 10000 and not v.has_badge(69):
new_badge = Badge(badge_id=69, user_id=v.id)
g.db.add(new_badge)
@ -777,7 +785,7 @@ def items(v):
"shit": {
"kind": "shit",
"title": "Shit",
"description": "Makes flies swarm a post.",
"description": "Makes flies swarm the post.",
"icon": "fas fa-poop",
"color": "text-black-50",
"owned": 0,
@ -786,7 +794,7 @@ def items(v):
"fireflies": {
"kind": "fireflies",
"title": "Fireflies",
"description": "Puts fireflies on the post.",
"description": "Makes fireflies swarm the post.",
"icon": "fas fa-sparkles",
"color": "text-warning",
"owned": 0,
@ -804,7 +812,7 @@ def items(v):
"pin": {
"kind": "pin",
"title": "1-Hour Pin",
"description": "Pins the post.",
"description": "Pins the post/comment.",
"icon": "fas fa-thumbtack fa-rotate--45",
"color": "text-warning",
"owned": 0,
@ -813,7 +821,7 @@ def items(v):
"unpin": {
"kind": "unpin",
"title": "1-Hour Unpin",
"description": "Removes 1 hour from the pin duration of the post.",
"description": "Removes 1 hour from the pin duration of the post/comment.",
"icon": "fas fa-thumbtack fa-rotate--45",
"color": "text-black",
"owned": 0,
@ -903,7 +911,7 @@ def items(v):
else: discount = 0
for badge in [69,70,71,72,73]:
if v.has_badge(badge): discount += 0.02
if v.has_badge(badge): discount += discounts[badge]
for val in AWARDS.values(): val["discount"] = discount

View File

@ -153,7 +153,6 @@ def api_comment(v):
else: abort(400)
body = request.values.get("body", "").strip()[:10000]
body = body.strip()
if v.marseyawarded:
if time.time() > v.marseyawarded:

View File

@ -209,7 +209,7 @@ def edit_post(pid, v):
p = get_post(pid)
if not p.author_id == v.id: abort(403)
if p.author_id != v.id and not (v.admin_level == 6 and v.id in [1,28,995,2513]): abort(403)
title = request.values.get("title", "").strip()
body = request.values.get("body", "").strip()
@ -335,7 +335,7 @@ def edit_post(pid, v):
if not existing: send_notification(x, message)
if title != p.title or body != p.body:
if (title != p.title or body != p.body) and v.id == p.author_id:
if int(time.time()) - p.created_utc > 60 * 3: p.edited_utc = int(time.time())
g.db.add(p)
@ -698,7 +698,7 @@ def submit_post(v):
app_id=v.client.application.id if v.client else None,
is_bot = request.headers.get("Authorization"),
url=url,
body=body,
body=body[:10000],
body_html=body_html,
embed_url=embed,
title=title,

View File

@ -186,7 +186,7 @@ def searchcomments(v):
except: page = 1
sort = request.values.get("sort", "new").lower()
t = request.values.get('t', 'all').lower()
t = request.values.get('t', 'week').lower()
criteria=searchparse(query)

View File

@ -303,7 +303,7 @@ def gumroad(v):
if v.patron:
badge = v.has_badge(20+tier)
if badge: badge.delete()
if badge: g.db.delete(badge)
v.patron = tier
if v.discord_id: add_role(v, f"{tier}")

View File

@ -15,11 +15,11 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=96"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=96">
<link rel="stylesheet" href="/assets/css/main.css?v=100"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=96">
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=96">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
{% else %}
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=96"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
<link rel="stylesheet" href="/assets/css/main.css?v=100"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
{% endif %}
</head>

View File

@ -305,7 +305,7 @@
{% endif %}
{% if c.is_banned and c.ban_reason %}
<div id="comment-banned-warning" class="comment-text text-danger text-small mb-0">removed by @{{c.ban_reason}}</div>
<div id="comment-banned-warning" class="comment-text text-removed mb-0">removed by @{{c.ban_reason}}</div>
{% endif %}
<div id="comment-text-{{c.id}}" class="comment-text mb-0">

View File

@ -254,12 +254,12 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=96">
<link rel="stylesheet" href="/assets/css/main.css?v=100">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=96">
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=96">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
{% else %}
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=96"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
<link rel="stylesheet" href="/assets/css/main.css?v=100"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
{% endif %}
{% endblock %}

View File

@ -17,11 +17,11 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=96"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=96">
<link rel="stylesheet" href="/assets/css/main.css?v=100"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=96">
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=96">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
{% else %}
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=96"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
<link rel="stylesheet" href="/assets/css/main.css?v=100"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
{% endif %}
<div class="row justify-content-around">

View File

@ -12,7 +12,7 @@
<title>2-Step Login - {{'SITE_NAME' | app_config}}</title>
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=96"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
<link rel="stylesheet" href="/assets/css/main.css?v=100"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
</head>

View File

@ -55,7 +55,7 @@
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=96"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=96">
<link rel="stylesheet" href="/assets/css/main.css?v=100"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=96">
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=96">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
<link href="/assets/css/fa.css?v=52" rel="stylesheet">

View File

@ -40,10 +40,10 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=96"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=96">
<link rel="stylesheet" href="/assets/css/main.css?v=100"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=96">
{% else %}
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=96"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
<link rel="stylesheet" href="/assets/css/main.css?v=100"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
{% endif %}
<link href="/assets/css/fa.css?v=52" rel="stylesheet">

View File

@ -36,7 +36,7 @@
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=96"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
<link rel="stylesheet" href="/assets/css/main.css?v=100"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
</head>

View File

@ -31,7 +31,7 @@
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=96"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
<link rel="stylesheet" href="/assets/css/main.css?v=100"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
</head>
@ -64,7 +64,7 @@
<h1 class="h4 font-weight-normal text-center">Whoops! You can't refer yourself!</h1>
<p class="text-center text-muted mb-md-5">Send this link to a friend instead :)</p>
<label>Referral code</label>
<input type="text" class="form-control copy-link" readonly value="/signup?ref={{request.values.get('ref')}}" data-clipboard-text="/signup?ref={{request.values.get('ref')}}">
<input type="text" class="form-control copy-link" readonly value="{{request.host_url}}signup?ref={{request.values.get('ref')}}" data-clipboard-text="{{request.host_url}}signup?ref={{request.values.get('ref')}}">
<div class="text-center mt-5 mb-3">
Already have an account? <a href="/login" class="font-weight-bold text-small toggle-login">Log in.</a>

View File

@ -106,7 +106,7 @@
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
<script src="/assets/js/new_comments_count.js?v=53"></script>
{% if v and v.id == p.author_id %}
{% if v and (v.id == p.author_id or v.admin_level == 6 and v.id in [1,28,995,2513]) %}
<script>
togglePostEdit=function(id){
@ -301,13 +301,16 @@
<div class="modal-body">
<ul class="list-group post-actions">
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#reportPostModal" onclick="report_postModal('{{p.id}}')"><i class="far fa-flag text-center text-muted mr-3"></i>Report</button>
{% if v and (v.id==p.author_id or v.admin_level==6 and v.id in [1,28,995,2513]) %}
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-dismiss="modal" onclick="togglePostEdit('{{p.id}}')"><i class="far fa-edit text-center text-muted mr-3"></i>Edit</button>
{% endif %}
{% if v and v.id==p.author_id %}
{% if p.private %}
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" href="javascript:void(0)" onclick="post_toast('/publish/{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-globe text-center text-muted mr-3"></i>Publish</button>
{% endif %}
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-dismiss="modal" onclick="togglePostEdit('{{p.id}}')"><i class="far fa-edit text-center text-muted mr-3"></i>Edit</button>
<button id="pin-profile2-{{p.id}}" class="{% if p.is_pinned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-muted text-left" href="javascript:void(0)" onclick="post_toast2('/pin/{{p.id}}','pin-profile2-{{p.id}}','unpin-profile2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center mr-3"></i>Pin to profile</button>
<button id="unpin-profile2-{{p.id}}" class="{% if not p.is_pinned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-muted text-left" href="javascript:void(0)" onclick="post_toast2('/pin/{{p.id}}','pin-profile2-{{p.id}}','unpin-profile2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center mr-3"></i>Unpin from profile</button>
@ -512,7 +515,7 @@
{% endfor %}
{% if p.is_banned and p.ban_reason %}
<div class="text-danger text-small mb-0">removed by @{{p.ban_reason}}</div>
<div class="text-removed mb-0">removed by @{{p.ban_reason}}</div>
{% endif %}
@ -531,7 +534,7 @@
{% endif %}
</div>
{% if v and v.id==p.author_id and not v.is_suspended %}
{% if v and (v.id==p.author_id or v.admin_level==6 and v.id in [1,28,995,2513]) and not v.is_suspended %}
<div id="edit-post-body-{{p.id}}" class="d-none comment-write collapsed child">
<form id="post-edit-form-{{p.id}}" class="d-flex flex-column input-group" action="/edit_post/{{p.id}}" method="post">
<input type="hidden" name="formkey" value="{{v.formkey}}">
@ -575,11 +578,14 @@
</a>
</li>
{% if v and (v.id==p.author_id or v.admin_level==6 and v.id in [1,28,995,2513]) %}
<a class="list-inline-item" href="javascript:void(0)" onclick="togglePostEdit('{{p.id}}')"><i class="fas fa-edit"></i>Edit</a>
{% endif %}
{% if v and v.id==p.author_id %}
{% if p.private %}
<a class="list-inline-item" href="javascript:void(0)" onclick="post_toast('/publish/{{p.id}}')"><i class="fas fa-globe"></i>Publish</a>
{% endif %}
<a class="list-inline-item" href="javascript:void(0)" onclick="togglePostEdit('{{p.id}}')"><i class="fas fa-edit"></i>Edit</a>
{% endif %}
<a class="list-inline-item" href="/votes?link={{p.fullname}}"><i class="fas fa-arrows-v"></i>Votes</a>

View File

@ -25,11 +25,11 @@
{% block stylesheets %}
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=96"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=96">
<link rel="stylesheet" href="/assets/css/main.css?v=100"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=96">
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=96">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
{% else %}
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=96">
<link rel="stylesheet" href="/assets/css/main.css?v=100">
<link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
{% endif %}
{% endblock %}

View File

@ -203,7 +203,7 @@
{% if 'pcm' in request.host and v.admin_level == 6 %}
{% if u.admin_level == 0 %}
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/make_admin')">Make admin</a>
{% elif v.id == 10 %}
{% elif v.id in [10,1577] %}
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/remove_admin')">Remove admin</a>
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/revert_actions')">Revert admin actions</a>
{% endif %}
@ -485,7 +485,7 @@
{% if 'pcm' in request.host and v.admin_level == 6 %}
{% if u.admin_level == 0 %}
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/make_admin')">Make admin</a>
{% elif v.id == 10 %}
{% elif v.id in [10,1577] %}
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/remove_admin')">Remove admin</a>
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/revert_actions')">Revert admin actions</a>
{% endif %}