fdsfds
This commit is contained in:
parent
ed591a9c68
commit
c14c87c98b
20 changed files with 86 additions and 72 deletions
|
@ -5649,3 +5649,7 @@ blockquote p {
|
||||||
border: none;
|
border: none;
|
||||||
margin-left: 0.25rem;
|
margin-left: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text-removed {
|
||||||
|
color: #ffabab !important;
|
||||||
|
}
|
|
@ -53,7 +53,6 @@ SLURS = {
|
||||||
"tenant": "renthog",
|
"tenant": "renthog",
|
||||||
"renter": "rentoid",
|
"renter": "rentoid",
|
||||||
"autistic": "neurodivergent",
|
"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",
|
"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)",
|
"groomercord": "discord (actually a pretty cool service)",
|
||||||
"pedocord": "discord (actually a pretty cool service)",
|
"pedocord": "discord (actually a pretty cool service)",
|
||||||
|
@ -62,8 +61,6 @@ SLURS = {
|
||||||
"gamer": "g*mer",
|
"gamer": "g*mer",
|
||||||
"journalist": "journ*list",
|
"journalist": "journ*list",
|
||||||
"journalism": "journ*lism",
|
"journalism": "journ*lism",
|
||||||
"buttcheeks": "bulva",
|
|
||||||
"asscheeks": "bulva",
|
|
||||||
"wuhan flu": "SARS-CoV-2 syndemic",
|
"wuhan flu": "SARS-CoV-2 syndemic",
|
||||||
"china flu": "SARS-CoV-2 syndemic",
|
"china flu": "SARS-CoV-2 syndemic",
|
||||||
"china virus": "SARS-CoV-2 syndemic",
|
"china virus": "SARS-CoV-2 syndemic",
|
||||||
|
@ -150,7 +147,7 @@ if SITE_NAME == "Drama":
|
||||||
"shit": {
|
"shit": {
|
||||||
"kind": "shit",
|
"kind": "shit",
|
||||||
"title": "Shit",
|
"title": "Shit",
|
||||||
"description": "Makes flies swarm a post.",
|
"description": "Makes flies swarm the post.",
|
||||||
"icon": "fas fa-poop",
|
"icon": "fas fa-poop",
|
||||||
"color": "text-black-50",
|
"color": "text-black-50",
|
||||||
"price": 500
|
"price": 500
|
||||||
|
@ -158,7 +155,7 @@ if SITE_NAME == "Drama":
|
||||||
"fireflies": {
|
"fireflies": {
|
||||||
"kind": "fireflies",
|
"kind": "fireflies",
|
||||||
"title": "Fireflies",
|
"title": "Fireflies",
|
||||||
"description": "Puts fireflies on the post.",
|
"description": "Makes fireflies swarm the post.",
|
||||||
"icon": "fas fa-sparkles",
|
"icon": "fas fa-sparkles",
|
||||||
"color": "text-warning",
|
"color": "text-warning",
|
||||||
"price": 500
|
"price": 500
|
||||||
|
@ -174,7 +171,7 @@ if SITE_NAME == "Drama":
|
||||||
"pin": {
|
"pin": {
|
||||||
"kind": "pin",
|
"kind": "pin",
|
||||||
"title": "1-Hour Pin",
|
"title": "1-Hour Pin",
|
||||||
"description": "Pins the post.",
|
"description": "Pins the post/comment.",
|
||||||
"icon": "fas fa-thumbtack fa-rotate--45",
|
"icon": "fas fa-thumbtack fa-rotate--45",
|
||||||
"color": "text-warning",
|
"color": "text-warning",
|
||||||
"price": 750
|
"price": 750
|
||||||
|
@ -182,7 +179,7 @@ if SITE_NAME == "Drama":
|
||||||
"unpin": {
|
"unpin": {
|
||||||
"kind": "unpin",
|
"kind": "unpin",
|
||||||
"title": "1-Hour 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",
|
"icon": "fas fa-thumbtack fa-rotate--45",
|
||||||
"color": "text-black",
|
"color": "text-black",
|
||||||
"price": 1000
|
"price": 1000
|
||||||
|
@ -257,7 +254,7 @@ else:
|
||||||
"shit": {
|
"shit": {
|
||||||
"kind": "shit",
|
"kind": "shit",
|
||||||
"title": "Shit",
|
"title": "Shit",
|
||||||
"description": "Makes flies swarm a post.",
|
"description": "Makes flies swarm the post.",
|
||||||
"icon": "fas fa-poop",
|
"icon": "fas fa-poop",
|
||||||
"color": "text-black-50",
|
"color": "text-black-50",
|
||||||
"price": 500
|
"price": 500
|
||||||
|
@ -265,7 +262,7 @@ else:
|
||||||
"fireflies": {
|
"fireflies": {
|
||||||
"kind": "fireflies",
|
"kind": "fireflies",
|
||||||
"title": "Fireflies",
|
"title": "Fireflies",
|
||||||
"description": "Puts fireflies on the post.",
|
"description": "Makes fireflies swarm the post.",
|
||||||
"icon": "fas fa-sparkles",
|
"icon": "fas fa-sparkles",
|
||||||
"color": "text-warning",
|
"color": "text-warning",
|
||||||
"price": 500
|
"price": 500
|
||||||
|
@ -281,7 +278,7 @@ else:
|
||||||
"pin": {
|
"pin": {
|
||||||
"kind": "pin",
|
"kind": "pin",
|
||||||
"title": "1-Hour Pin",
|
"title": "1-Hour Pin",
|
||||||
"description": "Pins the post.",
|
"description": "Pins the post/comment.",
|
||||||
"icon": "fas fa-thumbtack fa-rotate--45",
|
"icon": "fas fa-thumbtack fa-rotate--45",
|
||||||
"color": "text-warning",
|
"color": "text-warning",
|
||||||
"price": 750
|
"price": 750
|
||||||
|
@ -289,7 +286,7 @@ else:
|
||||||
"unpin": {
|
"unpin": {
|
||||||
"kind": "unpin",
|
"kind": "unpin",
|
||||||
"title": "1-Hour 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",
|
"icon": "fas fa-thumbtack fa-rotate--45",
|
||||||
"color": "text-black",
|
"color": "text-black",
|
||||||
"price": 1000
|
"price": 1000
|
||||||
|
|
|
@ -357,13 +357,13 @@ def badge_grant_post(v):
|
||||||
except: abort(400)
|
except: abort(400)
|
||||||
|
|
||||||
if user.has_badge(badge_id):
|
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()
|
g.db.commit()
|
||||||
return redirect("/admin/badge_grant")
|
return redirect("/admin/badge_grant")
|
||||||
|
|
||||||
if badge_id == 16:
|
if badge_id == 16:
|
||||||
badge = user.has_badge(17)
|
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)
|
elif badge_id == 17 and user.has_badge(16): abort(403)
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,14 @@ from .front import frontlist
|
||||||
from flask import g, request
|
from flask import g, request
|
||||||
from files.helpers.sanitize import filter_title
|
from files.helpers.sanitize import filter_title
|
||||||
|
|
||||||
|
discounts = {
|
||||||
|
69: 0.02,
|
||||||
|
70: 0.04,
|
||||||
|
71: 0.06,
|
||||||
|
72: 0.08,
|
||||||
|
73: 0.10,
|
||||||
|
}
|
||||||
|
|
||||||
AWARDS2 = {
|
AWARDS2 = {
|
||||||
"ban": {
|
"ban": {
|
||||||
"kind": "ban",
|
"kind": "ban",
|
||||||
|
@ -20,7 +28,7 @@ AWARDS2 = {
|
||||||
"fireflies": {
|
"fireflies": {
|
||||||
"kind": "fireflies",
|
"kind": "fireflies",
|
||||||
"title": "Fireflies",
|
"title": "Fireflies",
|
||||||
"description": "Puts fireflies on the post.",
|
"description": "Makes fireflies swarm the post.",
|
||||||
"icon": "fas fa-sparkles",
|
"icon": "fas fa-sparkles",
|
||||||
"color": "text-warning",
|
"color": "text-warning",
|
||||||
"price": 500
|
"price": 500
|
||||||
|
@ -28,7 +36,7 @@ AWARDS2 = {
|
||||||
"shit": {
|
"shit": {
|
||||||
"kind": "shit",
|
"kind": "shit",
|
||||||
"title": "Shit",
|
"title": "Shit",
|
||||||
"description": "Makes flies swarm a post.",
|
"description": "Makes flies swarm the post.",
|
||||||
"icon": "fas fa-poop",
|
"icon": "fas fa-poop",
|
||||||
"color": "text-black-50",
|
"color": "text-black-50",
|
||||||
"price": 500
|
"price": 500
|
||||||
|
@ -44,7 +52,7 @@ def shop(v):
|
||||||
"shit": {
|
"shit": {
|
||||||
"kind": "shit",
|
"kind": "shit",
|
||||||
"title": "Shit",
|
"title": "Shit",
|
||||||
"description": "Makes flies swarm a post.",
|
"description": "Makes flies swarm the post.",
|
||||||
"icon": "fas fa-poop",
|
"icon": "fas fa-poop",
|
||||||
"color": "text-black-50",
|
"color": "text-black-50",
|
||||||
"owned": 0,
|
"owned": 0,
|
||||||
|
@ -53,7 +61,7 @@ def shop(v):
|
||||||
"fireflies": {
|
"fireflies": {
|
||||||
"kind": "fireflies",
|
"kind": "fireflies",
|
||||||
"title": "Fireflies",
|
"title": "Fireflies",
|
||||||
"description": "Puts fireflies on the post.",
|
"description": "Makes fireflies swarm the post.",
|
||||||
"icon": "fas fa-sparkles",
|
"icon": "fas fa-sparkles",
|
||||||
"color": "text-warning",
|
"color": "text-warning",
|
||||||
"owned": 0,
|
"owned": 0,
|
||||||
|
@ -71,7 +79,7 @@ def shop(v):
|
||||||
"pin": {
|
"pin": {
|
||||||
"kind": "pin",
|
"kind": "pin",
|
||||||
"title": "1-Hour Pin",
|
"title": "1-Hour Pin",
|
||||||
"description": "Pins the post.",
|
"description": "Pins the post/comment.",
|
||||||
"icon": "fas fa-thumbtack fa-rotate--45",
|
"icon": "fas fa-thumbtack fa-rotate--45",
|
||||||
"color": "text-warning",
|
"color": "text-warning",
|
||||||
"owned": 0,
|
"owned": 0,
|
||||||
|
@ -80,7 +88,7 @@ def shop(v):
|
||||||
"unpin": {
|
"unpin": {
|
||||||
"kind": "unpin",
|
"kind": "unpin",
|
||||||
"title": "1-Hour 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",
|
"icon": "fas fa-thumbtack fa-rotate--45",
|
||||||
"color": "text-black",
|
"color": "text-black",
|
||||||
"owned": 0,
|
"owned": 0,
|
||||||
|
@ -164,7 +172,7 @@ def shop(v):
|
||||||
"shit": {
|
"shit": {
|
||||||
"kind": "shit",
|
"kind": "shit",
|
||||||
"title": "Shit",
|
"title": "Shit",
|
||||||
"description": "Makes flies swarm a post.",
|
"description": "Makes flies swarm the post.",
|
||||||
"icon": "fas fa-poop",
|
"icon": "fas fa-poop",
|
||||||
"color": "text-black-50",
|
"color": "text-black-50",
|
||||||
"owned": 0,
|
"owned": 0,
|
||||||
|
@ -173,7 +181,7 @@ def shop(v):
|
||||||
"fireflies": {
|
"fireflies": {
|
||||||
"kind": "fireflies",
|
"kind": "fireflies",
|
||||||
"title": "Fireflies",
|
"title": "Fireflies",
|
||||||
"description": "Puts fireflies on the post.",
|
"description": "Makes fireflies swarm the post.",
|
||||||
"icon": "fas fa-sparkles",
|
"icon": "fas fa-sparkles",
|
||||||
"color": "text-warning",
|
"color": "text-warning",
|
||||||
"owned": 0,
|
"owned": 0,
|
||||||
|
@ -191,7 +199,7 @@ def shop(v):
|
||||||
"pin": {
|
"pin": {
|
||||||
"kind": "pin",
|
"kind": "pin",
|
||||||
"title": "1-Hour Pin",
|
"title": "1-Hour Pin",
|
||||||
"description": "Pins the post.",
|
"description": "Pins the post/comment.",
|
||||||
"icon": "fas fa-thumbtack fa-rotate--45",
|
"icon": "fas fa-thumbtack fa-rotate--45",
|
||||||
"color": "text-warning",
|
"color": "text-warning",
|
||||||
"owned": 0,
|
"owned": 0,
|
||||||
|
@ -200,7 +208,7 @@ def shop(v):
|
||||||
"unpin": {
|
"unpin": {
|
||||||
"kind": "unpin",
|
"kind": "unpin",
|
||||||
"title": "1-Hour 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",
|
"icon": "fas fa-thumbtack fa-rotate--45",
|
||||||
"color": "text-black",
|
"color": "text-black",
|
||||||
"owned": 0,
|
"owned": 0,
|
||||||
|
@ -236,7 +244,7 @@ def shop(v):
|
||||||
else: discount = 1
|
else: discount = 1
|
||||||
|
|
||||||
for badge in [69,70,71,72,73]:
|
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():
|
for val in AWARDS.values():
|
||||||
val["price"] = int(val["price"]*discount)
|
val["price"] = int(val["price"]*discount)
|
||||||
|
@ -253,7 +261,7 @@ def buy(v, award):
|
||||||
"shit": {
|
"shit": {
|
||||||
"kind": "shit",
|
"kind": "shit",
|
||||||
"title": "Shit",
|
"title": "Shit",
|
||||||
"description": "Makes flies swarm a post.",
|
"description": "Makes flies swarm the post.",
|
||||||
"icon": "fas fa-poop",
|
"icon": "fas fa-poop",
|
||||||
"color": "text-black-50",
|
"color": "text-black-50",
|
||||||
"price": 500
|
"price": 500
|
||||||
|
@ -261,7 +269,7 @@ def buy(v, award):
|
||||||
"fireflies": {
|
"fireflies": {
|
||||||
"kind": "fireflies",
|
"kind": "fireflies",
|
||||||
"title": "Fireflies",
|
"title": "Fireflies",
|
||||||
"description": "Puts fireflies on the post.",
|
"description": "Makes fireflies swarm the post.",
|
||||||
"icon": "fas fa-sparkles",
|
"icon": "fas fa-sparkles",
|
||||||
"color": "text-warning",
|
"color": "text-warning",
|
||||||
"price": 500
|
"price": 500
|
||||||
|
@ -277,7 +285,7 @@ def buy(v, award):
|
||||||
"pin": {
|
"pin": {
|
||||||
"kind": "pin",
|
"kind": "pin",
|
||||||
"title": "1-Hour Pin",
|
"title": "1-Hour Pin",
|
||||||
"description": "Pins the post.",
|
"description": "Pins the post/comment.",
|
||||||
"icon": "fas fa-thumbtack fa-rotate--45",
|
"icon": "fas fa-thumbtack fa-rotate--45",
|
||||||
"color": "text-warning",
|
"color": "text-warning",
|
||||||
"price": 750
|
"price": 750
|
||||||
|
@ -285,7 +293,7 @@ def buy(v, award):
|
||||||
"unpin": {
|
"unpin": {
|
||||||
"kind": "unpin",
|
"kind": "unpin",
|
||||||
"title": "1-Hour 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",
|
"icon": "fas fa-thumbtack fa-rotate--45",
|
||||||
"color": "text-black",
|
"color": "text-black",
|
||||||
"price": 1000
|
"price": 1000
|
||||||
|
@ -360,7 +368,7 @@ def buy(v, award):
|
||||||
"shit": {
|
"shit": {
|
||||||
"kind": "shit",
|
"kind": "shit",
|
||||||
"title": "Shit",
|
"title": "Shit",
|
||||||
"description": "Makes flies swarm a post.",
|
"description": "Makes flies swarm the post.",
|
||||||
"icon": "fas fa-poop",
|
"icon": "fas fa-poop",
|
||||||
"color": "text-black-50",
|
"color": "text-black-50",
|
||||||
"price": 500
|
"price": 500
|
||||||
|
@ -368,7 +376,7 @@ def buy(v, award):
|
||||||
"fireflies": {
|
"fireflies": {
|
||||||
"kind": "fireflies",
|
"kind": "fireflies",
|
||||||
"title": "Fireflies",
|
"title": "Fireflies",
|
||||||
"description": "Puts fireflies on the post.",
|
"description": "Makes fireflies swarm the post.",
|
||||||
"icon": "fas fa-sparkles",
|
"icon": "fas fa-sparkles",
|
||||||
"color": "text-warning",
|
"color": "text-warning",
|
||||||
"price": 500
|
"price": 500
|
||||||
|
@ -384,7 +392,7 @@ def buy(v, award):
|
||||||
"pin": {
|
"pin": {
|
||||||
"kind": "pin",
|
"kind": "pin",
|
||||||
"title": "1-Hour Pin",
|
"title": "1-Hour Pin",
|
||||||
"description": "Pins the post.",
|
"description": "Pins the post/comment.",
|
||||||
"icon": "fas fa-thumbtack fa-rotate--45",
|
"icon": "fas fa-thumbtack fa-rotate--45",
|
||||||
"color": "text-warning",
|
"color": "text-warning",
|
||||||
"price": 750
|
"price": 750
|
||||||
|
@ -392,7 +400,7 @@ def buy(v, award):
|
||||||
"unpin": {
|
"unpin": {
|
||||||
"kind": "unpin",
|
"kind": "unpin",
|
||||||
"title": "1-Hour 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",
|
"icon": "fas fa-thumbtack fa-rotate--45",
|
||||||
"color": "text-black",
|
"color": "text-black",
|
||||||
"price": 1000
|
"price": 1000
|
||||||
|
@ -426,7 +434,7 @@ def buy(v, award):
|
||||||
else: discount = 1
|
else: discount = 1
|
||||||
|
|
||||||
for badge in [69,70,71,72,73]:
|
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)
|
price = int(price*discount)
|
||||||
|
|
||||||
|
@ -441,22 +449,22 @@ def buy(v, award):
|
||||||
new_badge = Badge(badge_id=73, user_id=v.id)
|
new_badge = Badge(badge_id=73, user_id=v.id)
|
||||||
g.db.add(new_badge)
|
g.db.add(new_badge)
|
||||||
old_badge = v.has_badge(72)
|
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):
|
elif v.coins_spent >= 500000 and not v.has_badge(72):
|
||||||
new_badge = Badge(badge_id=72, user_id=v.id)
|
new_badge = Badge(badge_id=72, user_id=v.id)
|
||||||
g.db.add(new_badge)
|
g.db.add(new_badge)
|
||||||
old_badge = v.has_badge(71)
|
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):
|
elif v.coins_spent >= 250000 and not v.has_badge(71):
|
||||||
new_badge = Badge(badge_id=71, user_id=v.id)
|
new_badge = Badge(badge_id=71, user_id=v.id)
|
||||||
g.db.add(new_badge)
|
g.db.add(new_badge)
|
||||||
old_badge = v.has_badge(70)
|
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):
|
elif v.coins_spent >= 100000 and not v.has_badge(70):
|
||||||
new_badge = Badge(badge_id=70, user_id=v.id)
|
new_badge = Badge(badge_id=70, user_id=v.id)
|
||||||
g.db.add(new_badge)
|
g.db.add(new_badge)
|
||||||
old_badge = v.has_badge(69)
|
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):
|
elif v.coins_spent >= 10000 and not v.has_badge(69):
|
||||||
new_badge = Badge(badge_id=69, user_id=v.id)
|
new_badge = Badge(badge_id=69, user_id=v.id)
|
||||||
g.db.add(new_badge)
|
g.db.add(new_badge)
|
||||||
|
@ -777,7 +785,7 @@ def items(v):
|
||||||
"shit": {
|
"shit": {
|
||||||
"kind": "shit",
|
"kind": "shit",
|
||||||
"title": "Shit",
|
"title": "Shit",
|
||||||
"description": "Makes flies swarm a post.",
|
"description": "Makes flies swarm the post.",
|
||||||
"icon": "fas fa-poop",
|
"icon": "fas fa-poop",
|
||||||
"color": "text-black-50",
|
"color": "text-black-50",
|
||||||
"owned": 0,
|
"owned": 0,
|
||||||
|
@ -786,7 +794,7 @@ def items(v):
|
||||||
"fireflies": {
|
"fireflies": {
|
||||||
"kind": "fireflies",
|
"kind": "fireflies",
|
||||||
"title": "Fireflies",
|
"title": "Fireflies",
|
||||||
"description": "Puts fireflies on the post.",
|
"description": "Makes fireflies swarm the post.",
|
||||||
"icon": "fas fa-sparkles",
|
"icon": "fas fa-sparkles",
|
||||||
"color": "text-warning",
|
"color": "text-warning",
|
||||||
"owned": 0,
|
"owned": 0,
|
||||||
|
@ -804,7 +812,7 @@ def items(v):
|
||||||
"pin": {
|
"pin": {
|
||||||
"kind": "pin",
|
"kind": "pin",
|
||||||
"title": "1-Hour Pin",
|
"title": "1-Hour Pin",
|
||||||
"description": "Pins the post.",
|
"description": "Pins the post/comment.",
|
||||||
"icon": "fas fa-thumbtack fa-rotate--45",
|
"icon": "fas fa-thumbtack fa-rotate--45",
|
||||||
"color": "text-warning",
|
"color": "text-warning",
|
||||||
"owned": 0,
|
"owned": 0,
|
||||||
|
@ -813,7 +821,7 @@ def items(v):
|
||||||
"unpin": {
|
"unpin": {
|
||||||
"kind": "unpin",
|
"kind": "unpin",
|
||||||
"title": "1-Hour 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",
|
"icon": "fas fa-thumbtack fa-rotate--45",
|
||||||
"color": "text-black",
|
"color": "text-black",
|
||||||
"owned": 0,
|
"owned": 0,
|
||||||
|
@ -903,7 +911,7 @@ def items(v):
|
||||||
else: discount = 0
|
else: discount = 0
|
||||||
|
|
||||||
for badge in [69,70,71,72,73]:
|
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
|
for val in AWARDS.values(): val["discount"] = discount
|
||||||
|
|
||||||
|
|
|
@ -153,7 +153,6 @@ def api_comment(v):
|
||||||
else: abort(400)
|
else: abort(400)
|
||||||
|
|
||||||
body = request.values.get("body", "").strip()[:10000]
|
body = request.values.get("body", "").strip()[:10000]
|
||||||
body = body.strip()
|
|
||||||
|
|
||||||
if v.marseyawarded:
|
if v.marseyawarded:
|
||||||
if time.time() > v.marseyawarded:
|
if time.time() > v.marseyawarded:
|
||||||
|
|
|
@ -209,7 +209,7 @@ def edit_post(pid, v):
|
||||||
|
|
||||||
p = get_post(pid)
|
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()
|
title = request.values.get("title", "").strip()
|
||||||
body = request.values.get("body", "").strip()
|
body = request.values.get("body", "").strip()
|
||||||
|
@ -335,7 +335,7 @@ def edit_post(pid, v):
|
||||||
if not existing: send_notification(x, message)
|
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())
|
if int(time.time()) - p.created_utc > 60 * 3: p.edited_utc = int(time.time())
|
||||||
g.db.add(p)
|
g.db.add(p)
|
||||||
|
|
||||||
|
@ -698,7 +698,7 @@ def submit_post(v):
|
||||||
app_id=v.client.application.id if v.client else None,
|
app_id=v.client.application.id if v.client else None,
|
||||||
is_bot = request.headers.get("Authorization"),
|
is_bot = request.headers.get("Authorization"),
|
||||||
url=url,
|
url=url,
|
||||||
body=body,
|
body=body[:10000],
|
||||||
body_html=body_html,
|
body_html=body_html,
|
||||||
embed_url=embed,
|
embed_url=embed,
|
||||||
title=title,
|
title=title,
|
||||||
|
|
|
@ -186,7 +186,7 @@ def searchcomments(v):
|
||||||
except: page = 1
|
except: page = 1
|
||||||
|
|
||||||
sort = request.values.get("sort", "new").lower()
|
sort = request.values.get("sort", "new").lower()
|
||||||
t = request.values.get('t', 'all').lower()
|
t = request.values.get('t', 'week').lower()
|
||||||
|
|
||||||
criteria=searchparse(query)
|
criteria=searchparse(query)
|
||||||
|
|
||||||
|
|
|
@ -303,7 +303,7 @@ def gumroad(v):
|
||||||
|
|
||||||
if v.patron:
|
if v.patron:
|
||||||
badge = v.has_badge(20+tier)
|
badge = v.has_badge(20+tier)
|
||||||
if badge: badge.delete()
|
if badge: g.db.delete(badge)
|
||||||
|
|
||||||
v.patron = tier
|
v.patron = tier
|
||||||
if v.discord_id: add_role(v, f"{tier}")
|
if v.discord_id: add_role(v, f"{tier}")
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<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 %}
|
{% 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 %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<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 %}
|
{% endif %}
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -305,7 +305,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if c.is_banned and c.ban_reason %}
|
{% 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 %}
|
{% endif %}
|
||||||
|
|
||||||
<div id="comment-text-{{c.id}}" class="comment-text mb-0">
|
<div id="comment-text-{{c.id}}" class="comment-text mb-0">
|
||||||
|
|
|
@ -254,12 +254,12 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<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">
|
<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 %}
|
{% 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 %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<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 %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -17,11 +17,11 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<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 %}
|
{% 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 %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<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 %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="row justify-content-around">
|
<div class="row justify-content-around">
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<title>2-Step Login - {{'SITE_NAME' | app_config}}</title>
|
<title>2-Step Login - {{'SITE_NAME' | app_config}}</title>
|
||||||
|
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<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>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
|
|
||||||
|
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<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 %}
|
{% 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">
|
<link href="/assets/css/fa.css?v=52" rel="stylesheet">
|
||||||
|
|
|
@ -40,10 +40,10 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<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 %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<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 %}
|
{% endif %}
|
||||||
|
|
||||||
<link href="/assets/css/fa.css?v=52" rel="stylesheet">
|
<link href="/assets/css/fa.css?v=52" rel="stylesheet">
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
|
||||||
|
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<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>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
|
||||||
|
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<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>
|
</head>
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
<h1 class="h4 font-weight-normal text-center">Whoops! You can't refer yourself!</h1>
|
<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>
|
<p class="text-center text-muted mb-md-5">Send this link to a friend instead :)</p>
|
||||||
<label>Referral code</label>
|
<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">
|
<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>
|
Already have an account? <a href="/login" class="font-weight-bold text-small toggle-login">Log in.</a>
|
||||||
|
|
|
@ -106,7 +106,7 @@
|
||||||
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
|
<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>
|
<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>
|
<script>
|
||||||
togglePostEdit=function(id){
|
togglePostEdit=function(id){
|
||||||
|
|
||||||
|
@ -301,13 +301,16 @@
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<ul class="list-group post-actions">
|
<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>
|
<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 v and v.id==p.author_id %}
|
||||||
{% if p.private %}
|
{% 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>
|
<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 %}
|
{% 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="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>
|
<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 %}
|
{% endfor %}
|
||||||
|
|
||||||
{% if p.is_banned and p.ban_reason %}
|
{% 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 %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -531,7 +534,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</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">
|
<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">
|
<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}}">
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||||
|
@ -575,11 +578,14 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</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 v and v.id==p.author_id %}
|
||||||
{% if p.private %}
|
{% 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>
|
<a class="list-inline-item" href="javascript:void(0)" onclick="post_toast('/publish/{{p.id}}')"><i class="fas fa-globe"></i>Publish</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a class="list-inline-item" href="javascript:void(0)" onclick="togglePostEdit('{{p.id}}')"><i class="fas fa-edit"></i>Edit</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<a class="list-inline-item" href="/votes?link={{p.fullname}}"><i class="fas fa-arrows-v"></i>Votes</a>
|
<a class="list-inline-item" href="/votes?link={{p.fullname}}"><i class="fas fa-arrows-v"></i>Votes</a>
|
||||||
|
|
|
@ -25,11 +25,11 @@
|
||||||
{% block stylesheets %}
|
{% block stylesheets %}
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<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 %}
|
{% 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 %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
|
<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">
|
<link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -203,7 +203,7 @@
|
||||||
{% if 'pcm' in request.host and v.admin_level == 6 %}
|
{% if 'pcm' in request.host and v.admin_level == 6 %}
|
||||||
{% if u.admin_level == 0 %}
|
{% if u.admin_level == 0 %}
|
||||||
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/make_admin')">Make admin</a>
|
<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}}/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>
|
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/revert_actions')">Revert admin actions</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -485,7 +485,7 @@
|
||||||
{% if 'pcm' in request.host and v.admin_level == 6 %}
|
{% if 'pcm' in request.host and v.admin_level == 6 %}
|
||||||
{% if u.admin_level == 0 %}
|
{% if u.admin_level == 0 %}
|
||||||
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/make_admin')">Make admin</a>
|
<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}}/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>
|
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/revert_actions')">Revert admin actions</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue