forked from rDrama/rDrama
1
0
Fork 0

Merge branch 'frost' of https://github.com/Aevann1/Drama into frost

master
kek7198 2021-12-31 17:56:32 -06:00
commit 06b1f9e640
25 changed files with 127 additions and 70 deletions

View File

@ -100,6 +100,7 @@ class User(Base):
fp = Column(String)
sigs_disabled = Column(Boolean)
fish = Column(Boolean)
progressivestack = Column(Integer)
friends = deferred(Column(String))
friends_html = deferred(Column(String))
enemies = deferred(Column(String))

View File

@ -1,37 +1,26 @@
from os import environ
from os import environ, listdir
import re
from copy import deepcopy
SITE = environ.get("DOMAIN", '').strip()
SITE_NAME = environ.get("SITE_NAME", '').strip()
marseys = []
others = []
for x in sorted(x.replace('.webp','') for x in listdir("files/assets/images/emojis")):
if x.startswith('mar') or x.endswith('sey'): marseys.append(x)
else: others.append(x)
allemojis = marseys + others
AJ_REPLACEMENTS = {
" you're ": ' $#3$2 ',
' your ': " you're ",
' $#3$2 ': ' your ',
" too ": ' $#3$3 ',
' to ': " too ",
' $#3$3 ': ' to ',
' my ': ' their ',
' mine ': ' their ',
' to ': " too ",
" You're ": ' $#3$2 ',
' Your ': " You're ",
' $#3$2 ': ' Your ',
" Too ": ' $#3$3 ',
' To ': " Too ",
' $#3$3 ': ' To ',
' My ': ' Their ',
' Mine ': ' Their ',
" YOU'RE ": ' $#3$2 ',
' YOUR ': " YOU'RE ",
' $#3$2 ': ' YOUR ',
" TOO ": ' $#3$3 ',
' TO ': " TOO ",
' $#3$3 ': ' TO ',
' MY ': ' THEIR ',
' MINE ': ' THEIR ',
}
SLURS = {
@ -549,7 +538,7 @@ AWARDS = {
"description": "Makes flies swarm the post.",
"icon": "fas fa-poop",
"color": "text-black-50",
"price": 500
"price": 300
},
"fireflies": {
"kind": "fireflies",
@ -557,7 +546,7 @@ AWARDS = {
"description": "Makes fireflies swarm the post.",
"icon": "fas fa-sparkles",
"color": "text-warning",
"price": 500
"price": 300
},
"train": {
"kind": "train",
@ -565,8 +554,16 @@ AWARDS = {
"description": "Summons a train on the post.",
"icon": "fas fa-train",
"color": "text-pink",
"price": 500
"price": 300
},
"wholesome": {
"kind": "wholesome",
"title": "Wholesome",
"description": "Summons a wholesome marsey on the post.",
"icon": "fas fa-smile-beam",
"color": "text-yellow",
"price": 300
},
"pin": {
"kind": "pin",
"title": "1-Hour Pin",
@ -615,6 +612,14 @@ AWARDS = {
"color": "text-purple",
"price": 2500
},
"progressivestack": {
"kind": "progressivestack",
"title": "Progressive Stack",
"description": "Makes votes on the recipient's posts and comments weigh double in the ranking algorithm for 6 hours.",
"icon": "fas fa-bullhorn",
"color": "text-red",
"price": 3000
},
"marsey": {
"kind": "marsey",
"title": "Marsey",

View File

@ -25,7 +25,7 @@ class RedditorMention(SpanToken):
pattern = re.compile("(^|\s|\n)(u/|/u/)((\w|-){3,25})")
parse_inner = False
def __init__(self, match_obj):
self.target = (match_obj.group(2), match_obj.group(3))
self.target = (match_obj.group(1), match_obj.group(3))
class CustomRenderer(HTMLRenderer):

View File

@ -219,7 +219,7 @@ def monthly(v):
@app.get('/admin/sidebar')
@admin_level_required(2)
@admin_level_required(3)
def get_sidebar(v):
try:
@ -232,7 +232,7 @@ def get_sidebar(v):
@app.post('/admin/sidebar')
@limiter.limit("1/second")
@admin_level_required(2)
@admin_level_required(3)
@validate_formkey
def post_sidebar(v):
@ -786,7 +786,7 @@ def admin_title_change(user_id, v):
user=g.db.query(User).with_for_update().filter_by(id=user.id).first()
user.customtitle=new_name
if request.values.get("locked"): user.flairchanged = time.time() + 2629746
if request.values.get("locked"): user.flairchanged = int(time.time()) + 2629746
g.db.add(user)
if user.flairchanged: kind = "set_flair_locked"

View File

@ -24,7 +24,7 @@ AWARDS3 = {
"description": "Makes fireflies swarm the post.",
"icon": "fas fa-sparkles",
"color": "text-warning",
"price": 500
"price": 300
},
"shit": {
"kind": "shit",
@ -32,7 +32,7 @@ AWARDS3 = {
"description": "Makes flies swarm the post.",
"icon": "fas fa-poop",
"color": "text-black-50",
"price": 500
"price": 300
},
}
@ -261,7 +261,7 @@ def award_post(pid, v):
elif kind == "agendaposter" and not (author.agendaposter and author.agendaposter_expires_utc == 0):
if author.username == "911roofer": abort(403)
if author.agendaposter_expires_utc and time.time() < author.agendaposter_expires_utc: author.agendaposter_expires_utc += 86400
else: author.agendaposter_expires_utc = time.time() + 86400
else: author.agendaposter_expires_utc = int(time.time()) + 86400
author.agendaposter = True
if not author.has_badge(26):
@ -273,7 +273,7 @@ def award_post(pid, v):
author.customtitleplain = new_name
author.customtitle = filter_emojis_only(new_name)
if len(author.customtitle) > 1000: abort(403)
author.flairchanged = time.time() + 86400
author.flairchanged = int(time.time()) + 86400
elif kind == "pause":
author.mute = True
send_repeatable_notification(CARP_ID, f"@{v.username} used {kind} award!")
@ -290,18 +290,18 @@ def award_post(pid, v):
send_notification(author.id, f"@AutoJanny has given you the following profile badge:\n\n![]({new_badge.path})\n\n{new_badge.name}")
elif kind == "marsey":
if author.marseyawarded: author.marseyawarded += 86400
else: author.marseyawarded = time.time() + 86400
else: author.marseyawarded = int(time.time()) + 86400
elif kind == "pizzashill":
if author.bird:
return {"error": "This user is the under the effect of a conflicting award: Bird Site award."}, 404
if author.longpost: author.longpost += 86400
else: author.longpost = time.time() + 86400
else: author.longpost = int(time.time()) + 86400
send_repeatable_notification(IDIO_ID, f"@{v.username} used {kind} award on [{post.shortlink}]({post.shortlink})")
elif kind == "bird":
if author.longpost:
return {"error": "This user is the under the effect of a conflicting award: Pizzashill award."}, 404
if author.bird: author.bird += 86400
else: author.bird = time.time() + 86400
else: author.bird = int(time.time()) + 86400
elif kind == "eye":
author.eye = True
send_repeatable_notification(CARP_ID, f"@{v.username} used {kind} award!")
@ -331,6 +331,9 @@ def award_post(pid, v):
new_badge = Badge(badge_id=90, user_id=author.id)
g.db.add(new_badge)
send_notification(author.id, f"@AutoJanny has given you the following profile badge:\n\n![]({new_badge.path})\n\n{new_badge.name}")
elif kind == "progressivestack":
if author.progressivestack: author.progressivestack += 21600
else: author.progressivestack = int(time.time()) + 21600
if post.author.received_award_count: post.author.received_award_count += 1
else: post.author.received_award_count = 1
@ -438,7 +441,7 @@ def award_comment(cid, v):
elif kind == "agendaposter" and not (author.agendaposter and author.agendaposter_expires_utc == 0):
if author.username == "911roofer": abort(403)
if author.agendaposter_expires_utc and time.time() < author.agendaposter_expires_utc: author.agendaposter_expires_utc += 86400
else: author.agendaposter_expires_utc = time.time() + 86400
else: author.agendaposter_expires_utc = int(time.time()) + 86400
author.agendaposter = True
if not author.has_badge(26):
@ -450,7 +453,7 @@ def award_comment(cid, v):
author.customtitleplain = new_name
author.customtitle = filter_emojis_only(new_name)
if len(author.customtitle) > 1000: abort(403)
author.flairchanged = time.time() + 86400
author.flairchanged = int(time.time()) + 86400
elif kind == "pause":
author.mute = True
send_repeatable_notification(CARP_ID, f"@{v.username} used {kind} award!")
@ -467,18 +470,18 @@ def award_comment(cid, v):
send_notification(author.id, f"@AutoJanny has given you the following profile badge:\n\n![]({new_badge.path})\n\n{new_badge.name}")
elif kind == "marsey":
if author.marseyawarded: author.marseyawarded += 86400
else: author.marseyawarded = time.time() + 86400
else: author.marseyawarded = int(time.time()) + 86400
elif kind == "pizzashill":
if author.bird:
return {"error": "This user is the under the effect of a conflicting award: Bird Site award."}, 404
if author.longpost: author.longpost += 86400
else: author.longpost = time.time() + 86400
else: author.longpost = int(time.time()) + 86400
send_repeatable_notification(IDIO_ID, f"@{v.username} used {kind} award on [{c.shortlink}]({c.shortlink})")
elif kind == "bird":
if author.longpost:
return {"error": "This user is the under the effect of a conflicting award: Pizzashill award."}, 404
if author.bird: author.bird += 86400
else: author.bird = time.time() + 86400
else: author.bird = int(time.time()) + 86400
elif kind == "eye":
author.eye = True
send_repeatable_notification(CARP_ID, f"@{v.username} used {kind} award!")
@ -508,6 +511,9 @@ def award_comment(cid, v):
new_badge = Badge(badge_id=90, user_id=author.id)
g.db.add(new_badge)
send_notification(author.id, f"@AutoJanny has given you the following profile badge:\n\n![]({new_badge.path})\n\n{new_badge.name}")
elif kind == "progressivestack":
if author.progressivestack: author.progressivestack += 21600
else: author.progressivestack = int(time.time()) + 21600
if c.author.received_award_count: c.author.received_award_count += 1
else: c.author.received_award_count = 1

View File

@ -27,8 +27,7 @@ titleheaders = {"User-Agent": f"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleW
if path.exists(f'snappy_{site_name}.txt'):
with open(f'snappy_{site_name}.txt', "r") as f:
snappyquotes = f.read().split("{[para]}")
snappyquotes = f.read().split("{[para]}") + [f':#{x}:' for x in marseys]
@app.post("/toggle_club/<pid>")
@auth_required
def toggle_club(pid, v):

View File

@ -12,7 +12,6 @@ from files.classes.mod_logs import ACTIONTYPES, ACTIONTYPES2
site = environ.get("DOMAIN").strip()
site_name = environ.get("SITE_NAME").strip()
@app.get("/privacy")
@auth_desired
def privacy(v):
@ -21,10 +20,9 @@ def privacy(v):
@app.get("/emojis")
@auth_desired
def emojis(v):
emojis = (x.replace('.webp','') for x in os.listdir("files/assets/images/emojis"))
if not v or v.oldsite: template = ''
else: template = 'CHRISTMAS/'
return render_template(f"{template}emojis.html", v=v, emojis=emojis)
return render_template(f"{template}emojis.html", v=v, emojis=allemojis)
@app.get('/sidebar')
@auth_desired

View File

@ -118,6 +118,7 @@ def api_vote_post(post_id, new, v):
post.upvotes = g.db.query(Vote.id).filter_by(submission_id=post.id, vote_type=1).count()
post.downvotes = g.db.query(Vote.id).filter_by(submission_id=post.id, vote_type=-1).count()
post.realupvotes = g.db.query(Vote.id).filter_by(submission_id=post.id, vote_type=1, real=True).count() - g.db.query(Vote.id).filter_by(submission_id=post.id, vote_type=1, real=False).count() + g.db.query(Vote.id).filter_by(submission_id=post.id, vote_type=-1).count()
if post.author.progressivestack: post.realupvotes *= 2
g.db.add(post)
g.db.commit()
except: g.db.rollback()
@ -184,6 +185,7 @@ def api_vote_comment(comment_id, new, v):
comment.upvotes = g.db.query(CommentVote.id).filter_by(comment_id=comment.id, vote_type=1).count()
comment.downvotes = g.db.query(CommentVote.id).filter_by(comment_id=comment.id, vote_type=-1).count()
comment.realupvotes = g.db.query(CommentVote.id).filter_by(comment_id=comment.id, vote_type=1, real=True).count() - g.db.query(CommentVote.id).filter_by(comment_id=comment.id, vote_type=1, real=False).count() + g.db.query(CommentVote.id).filter_by(comment_id=comment.id, vote_type=-1).count()
if comment.author.progressivestack: comment.realupvotes *= 2
g.db.add(comment)
g.db.commit()
except: g.db.rollback()

View File

@ -336,7 +336,7 @@
<script src="/assets/CHRISTMAS/js/lite-youtube.js?a=1"></script>
<script src="/assets/CHRISTMAS/js/gif_modal.js?a=1"></script>
<script src="/assets/CHRISTMAS/js/emoji_modal.js?a=14"></script>
<script src="/assets/CHRISTMAS/js/emoji_modal.js?a=15"></script>
<script defer src="/assets/CHRISTMAS/js/popover.js?a=1"></script>

View File

@ -416,7 +416,7 @@
<script src="/assets/CHRISTMAS/js/settings_profile.js?a=1"></script>
<script src="/assets/CHRISTMAS/js/gif_modal.js?a=1"></script>
<script src="/assets/CHRISTMAS/js/emoji_modal.js?a=14"></script>
<script src="/assets/CHRISTMAS/js/emoji_modal.js?a=15"></script>
<script>
document.onpaste = function(event) {

View File

@ -15,7 +15,7 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=54"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=3">
<link rel="stylesheet" href="/static/assets/css/main.css?a=56"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=3">
{% if v.agendaposter %}
<style>
html {

View File

@ -245,19 +245,22 @@
{% if not c.parent_submission and c.author_id!=NOTIFICATIONS_ID and c.author_id!=AUTOJANNY_ID and c.author_id!=v.id %}
<a class="btn btn-primary" role="button" onclick="openReplyBox('reply-m-{{c.id}}')">Reply</a>
<a class="btn btn-primary" role="button" onclick="openReplyBox('reply-message-{{c.id}}')">Reply</a>
<pre></pre>
<div id="reply-m-{{c.id}}" class="d-none">
<div id="reply-message-{{c.id}}" class="d-none">
<div id="comment-form-space-{{c.id}}" class="comment-write collapsed child">
<form id="reply-to-message-{{c.id}}" action="/reply" method="post" class="input-group" enctype="multipart/form-data">
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
<textarea autocomplete="off" maxlength="10000" name="body" form="reply-to-t3_{{c.id}}" data-id="{{c.id}}" class="comment-box form-control rounded" id="reply-form-body-{{c.id}}" aria-label="With textarea" rows="3"></textarea>
<textarea autocomplete="off" maxlength="10000" name="body" form="reply-to-t3_{{c.id}}" data-id="{{c.id}}" class="comment-box form-control rounded" id="reply-form-body-{{c.id}}" aria-label="With textarea" rows="3" oninput="markdown('reply-form-body-{{c.id}}', 'message-reply-{{c.id}}')"></textarea>
<div class="comment-format" id="comment-format-bar-{{c.id}}">
<label class="btn btn-secondary format m-0" for="gif-reply-btn-{{c.id}}">
<i id="emoji-reply-btn-{{c.id}}" class="fas fa-smile-beam" onclick="loadEmojis('reply-form-body-{{c.id}}')" aria-hidden="true" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Add Emoji"></i>
</label>
</div>
<a role="button" onclick="document.getElementById('reply-m-{{c.id}}').classList.add('d-none')" class="btn btn-link text-muted ml-auto cancel-form">Cancel</a>
<div id="message-reply-{{c.id}}" class="preview-edit mt-2"></div>
<a role="button" onclick="document.getElementById('reply-message-{{c.id}}').classList.add('d-none')" class="btn btn-link text-muted ml-auto cancel-form">Cancel</a>
<a id="save-reply-to-{{c.id}}" class="btn btn-primary text-white ml-2" onclick="post_reply('{{c.id}}');" role="button">Reply</a>
</form>
</div>

View File

@ -7,7 +7,7 @@
<script src="/static/assets/js/bootstrap.js?a=3"></script>
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=54">
<link rel="stylesheet" href="/static/assets/css/main.css?a=56">
<link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=3">
{% if v.agendaposter %}
<style>
@ -32,7 +32,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=54"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
<link rel="stylesheet" href="/static/assets/css/main.css?a=56"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
{% endif %}
<meta charset="utf-8">

View File

@ -81,7 +81,7 @@
</div>
</div>
<script src="/static/assets/js/emoji_modal.js?a=14"></script>
<script src="/static/assets/js/emoji_modal.js?a=15"></script>
<style>
a.emojitab {

View File

@ -6,7 +6,7 @@
{% block content %}
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=54"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=3">
<link rel="stylesheet" href="/static/assets/css/main.css?a=56"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=3">
{% if v.agendaposter %}
<style>
html {
@ -30,7 +30,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=54"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
<link rel="stylesheet" href="/static/assets/css/main.css?a=56"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
{% endif %}
<div class="row justify-content-around">

View File

@ -18,7 +18,7 @@
{% endblock %}
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=54">
<link rel="stylesheet" href="/static/assets/css/main.css?a=56">
<link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
</head>

View File

@ -14,7 +14,7 @@
<title>2-Step Login - {{'SITE_NAME' | app_config}}</title>
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=54"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
<link rel="stylesheet" href="/static/assets/css/main.css?a=56"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
</head>

View File

@ -34,7 +34,7 @@
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=54"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=3">
<link rel="stylesheet" href="/static/assets/css/main.css?a=56"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=3">
{% if v.agendaposter %}
<style>
html {

View File

@ -39,10 +39,10 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=54"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=3">
<link rel="stylesheet" href="/static/assets/css/main.css?a=56"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=3">
{% else %}
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=54"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
<link rel="stylesheet" href="/static/assets/css/main.css?a=56"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
{% endif %}
</head>

View File

@ -31,7 +31,7 @@
<title>{% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}Sign up - {{'SITE_NAME' | app_config}}{% endif %}</title>
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=54"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
<link rel="stylesheet" href="/static/assets/css/main.css?a=56"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
</head>

View File

@ -32,7 +32,7 @@
<title>{% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}{{'SITE_NAME' | app_config}}{% endif %}</title>
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=54"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
<link rel="stylesheet" href="/static/assets/css/main.css?a=56"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
</head>

View File

@ -13,6 +13,45 @@
{% block title %}
{% if p.award_count("wholesome") %}
<style>
.seal {
position:fixed;
z-index:9999;
pointer-events: none;
}
</style>
<marquee class="seal" behavior="alternate" direction="up" height="100%">
<marquee direction="right" behavior="alternate" width="100%">
<img width=100 src="/static/assets/images/emojis/marseywholesome.webp?a=3">
</marquee>
</marquee>
{% endif %}
{% if p.award_count("wholesome") > 1 %}
<marquee class="seal" behavior="alternate" direction="down" height="100%">
<marquee direction="right" behavior="alternate" width="100%">
<img width=100 src="/static/assets/images/emojis/marseywholesome.webp?a=3">
</marquee>
</marquee>
{% endif %}
{% if p.award_count("wholesome") > 2 %}
<marquee class="seal" behavior="alternate" direction="up" height="100%">
<marquee direction="left" behavior="alternate" width="100%">
<img width=100 src="/static/assets/images/emojis/marseywholesome.webp?a=3">
</marquee>
</marquee>
{% endif %}
{% if p.award_count("wholesome") > 3 %}
<marquee class="seal" behavior="alternate" direction="down" height="100%">
<marquee direction="left" behavior="alternate" width="100%">
<img width=100 src="/static/assets/images/emojis/marseywholesome.webp?a=3">
</marquee>
</marquee>
{% endif %}
{% if p.award_count("train") %}
<style>
@keyframes train {
@ -480,7 +519,7 @@
<button form="post-edit-form-{{p.id}}" class="btn btn-primary ml-2 fl-r">Save Edit</button>
<a role="button" onclick="togglePostEdit('{{p.id}}')" class="btn btn-link text-muted ml-auto cancel-form fl-r">Cancel</a>
</form>
<div id="post-edit-{{p.id}}" class="mb-3 mt-5"></div>
<div id="post-edit-{{p.id}}" class="preview-edit mb-3 mt-5"></div>
<div class="form-text text-small p-0 m-0"><a href="/formatting" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %}>Formatting help</a></div>
</div>
{% endif %}

View File

@ -26,7 +26,7 @@
{% block stylesheets %}
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=54"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=3">
<link rel="stylesheet" href="/static/assets/css/main.css?a=56"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=3">
{% if v.agendaposter %}
<style>
html {
@ -50,7 +50,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=54">
<link rel="stylesheet" href="/static/assets/css/main.css?a=56">
<link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=3">
{% endif %}
{% endblock %}

View File

@ -167,7 +167,7 @@
<form class="d-none profile-toggleable" id="message" action="/@{{u.username}}/message" method="post">
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
<pre></pre>
<textarea autocomplete="off" id="input-message" form="message" name="message" rows="3" maxlength="1000" class="form-control b2" required></textarea>
<textarea autocomplete="off" id="input-message" form="message" name="message" rows="3" maxlength="1000" class="form-control b2" oninput="markdown('input-message', 'message-preview')" required></textarea>
<pre></pre>
<pre class="btn btn-secondary format d-inline-block m-0 fas fa-bold" aria-hidden="true" onclick="makeBold('input-message')" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Bold"></pre>
&nbsp;
@ -180,6 +180,8 @@
<input autocomplete="off" type="submit" value="Submit" class="btn btn-primary mt-3">
</form>
<div id="message-preview" class="preview-edit mt-2"></div>
<div class="d-none mt-3 profile-toggleable" id="coin-transfer">
<input autocomplete="off" id="coins-transfer-amount" class="form-control" name="amount" type="number" oninput="updateTax()">
<div>{{u.username}} will receive <span id="coins-transfer-taxed">0</span> {{'COINS_NAME' | app_config}}</div>
@ -446,7 +448,7 @@
<form class="d-none profile-toggleable-mobile" id='message-mobile' action="/@{{u.username}}/message" method="post">
<pre></pre>
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
<textarea autocomplete="off" id="input-message-mobile" form="message-mobile" name="message" rows="3" maxlength="1000" class="form-control" required></textarea>
<textarea autocomplete="off" id="input-message-mobile" form="message-mobile" name="message" rows="3" maxlength="1000" class="form-control" oninput="markdown('input-message-mobile', 'message-preview-mobile')" required></textarea>
<pre></pre>
<pre class="btn btn-secondary format d-inline-block m-0 fas fa-bold" aria-hidden="true" onclick="makeBold('input-message-mobile')" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Bold"></pre>
&nbsp;
@ -459,6 +461,8 @@
<input autocomplete="off" type="submit" value="Submit" class="btn btn-primary mt-3">
</form>
<div id="message-preview-mobile" class="preview-edit my-3"></div>
<div class="d-none mt-3 profile-toggleable-mobile" id="coin-transfer-mobile">
<input autocomplete="off" id="coins-transfer-amount-mobile" class="form-control" name="amount" type="number" oninput="updateTax(true)">
<div>{{u.username}} will receive <span id="coins-transfer-taxed-mobile">0</span> {{'COINS_NAME' | app_config}}</div>
@ -702,6 +706,8 @@
</nav>
{% endif %}
<script src="/static/assets/js/marked.js?a=3"></script>
<style>
.userbanner {
object-fit: cover !important;

File diff suppressed because one or more lines are too long