enemies and fixes
This commit is contained in:
parent
5ef73cbf2a
commit
94bdf2926a
24 changed files with 173 additions and 43 deletions
|
@ -5567,7 +5567,7 @@ blockquote + p {
|
||||||
blockquote p {
|
blockquote p {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
padding-bottom: 0.7rem;
|
padding-bottom: 0.7rem;
|
||||||
padding-top: 0.3rem;
|
padding-top: 0.7rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.unread {
|
.unread {
|
||||||
|
|
|
@ -326,8 +326,6 @@ class Comment(Base):
|
||||||
|
|
||||||
url_noquery = url.split('?')[0]
|
url_noquery = url.split('?')[0]
|
||||||
body = body.replace(url, f"{url_noquery}?{urlencode(p, True)}")
|
body = body.replace(url, f"{url_noquery}?{urlencode(p, True)}")
|
||||||
|
|
||||||
if self.author.sig_html and (self.author_id == 1904 or not (v and v.sigs_disabled)): return body + '<hr>' + self.author.sig_html
|
|
||||||
return body
|
return body
|
||||||
|
|
||||||
def plainbody(self, v):
|
def plainbody(self, v):
|
||||||
|
|
|
@ -327,7 +327,6 @@ class Submission(Base):
|
||||||
|
|
||||||
if v and not v.oldreddit: body = body.replace("old.reddit.com", "reddit.com")
|
if v and not v.oldreddit: body = body.replace("old.reddit.com", "reddit.com")
|
||||||
if v and v.nitter: body = body.replace("www.twitter.com", "nitter.net").replace("twitter.com", "nitter.net")
|
if v and v.nitter: body = body.replace("www.twitter.com", "nitter.net").replace("twitter.com", "nitter.net")
|
||||||
if self.author.sig_html and (self.author_id == 1904 or not (v and v.sigs_disabled)): return body + '<hr>' + self.author.sig_html
|
|
||||||
return body
|
return body
|
||||||
|
|
||||||
def plainbody(self, v):
|
def plainbody(self, v):
|
||||||
|
|
|
@ -89,6 +89,8 @@ class User(Base):
|
||||||
sigs_disabled = Column(Boolean)
|
sigs_disabled = Column(Boolean)
|
||||||
friends = Column(String)
|
friends = Column(String)
|
||||||
friends_html = Column(String)
|
friends_html = Column(String)
|
||||||
|
enemies = Column(String)
|
||||||
|
enemies_html = Column(String)
|
||||||
is_banned = Column(Integer, default=0)
|
is_banned = Column(Integer, default=0)
|
||||||
unban_utc = Column(Integer, default=0)
|
unban_utc = Column(Integer, default=0)
|
||||||
ban_reason = Column(String)
|
ban_reason = Column(String)
|
||||||
|
|
|
@ -75,7 +75,7 @@ no_images = ['b',
|
||||||
'span',
|
'span',
|
||||||
]
|
]
|
||||||
|
|
||||||
allowed_attributes = {'*': ['href', 'style', 'src', 'class', 'title', 'rel', 'data-bs-original-name', 'direction', 'behavior']}
|
allowed_attributes = {'*': ['href', 'style', 'src', 'class', 'title', 'rel', 'data-bs-original-name', 'direction', 'behavior', 'scrollamount']}
|
||||||
|
|
||||||
allowed_protocols = ['http', 'https']
|
allowed_protocols = ['http', 'https']
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,15 @@ from files.helpers.discord import add_role
|
||||||
|
|
||||||
SITE_NAME = environ.get("SITE_NAME", "").strip()
|
SITE_NAME = environ.get("SITE_NAME", "").strip()
|
||||||
|
|
||||||
|
@app.get("/fix")
|
||||||
|
@admin_level_required(6)
|
||||||
|
def fix(v):
|
||||||
|
for u in g.db.query(User).options(lazyload('*')).all():
|
||||||
|
u.post_count = g.db.query(Submission.id).options(lazyload('*')).filter_by(author_id=u.id, is_banned=False, deleted_utc=0).count()
|
||||||
|
g.db.add(u)
|
||||||
|
g.db.commit()
|
||||||
|
return 'sex'
|
||||||
|
|
||||||
@app.get("/truescore")
|
@app.get("/truescore")
|
||||||
@admin_level_required(6)
|
@admin_level_required(6)
|
||||||
def truescore(v):
|
def truescore(v):
|
||||||
|
|
|
@ -737,7 +737,7 @@ def submit_post(v):
|
||||||
if request.headers.get("Authorization"): return {"error": f"File type not allowed"}, 400
|
if request.headers.get("Authorization"): return {"error": f"File type not allowed"}, 400
|
||||||
else: return render_template("submit.html", v=v, error=f"File type not allowed.", title=title, body=request.values.get("body", "")), 400
|
else: return render_template("submit.html", v=v, error=f"File type not allowed.", title=title, body=request.values.get("body", "")), 400
|
||||||
|
|
||||||
if file.content_type.startswith('video/') and v.coins < app.config["VIDEO_COIN_REQUIREMENT"] and v.admin_level < 1:
|
if file.content_type.startswith('video/') and v.truecoins < app.config["VIDEO_COIN_REQUIREMENT"] and v.admin_level < 1:
|
||||||
if request.headers.get("Authorization"):
|
if request.headers.get("Authorization"):
|
||||||
return {
|
return {
|
||||||
"error": f"You need at least {app.config['VIDEO_COIN_REQUIREMENT']} coins to upload videos"
|
"error": f"You need at least {app.config['VIDEO_COIN_REQUIREMENT']} coins to upload videos"
|
||||||
|
@ -927,7 +927,7 @@ def submit_post(v):
|
||||||
g.db.add(n)
|
g.db.add(n)
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
|
|
||||||
v.post_count = g.db.query(Submission.id).options(lazyload('*')).filter_by(is_banned=False, deleted_utc=0).count()
|
v.post_count = g.db.query(Submission.id).options(lazyload('*')).filter_by(author_id=v.id, is_banned=False, deleted_utc=0).count()
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
|
|
||||||
cache.delete_memoized(frontlist)
|
cache.delete_memoized(frontlist)
|
||||||
|
|
|
@ -203,14 +203,14 @@ def settings_profile_post(v):
|
||||||
|
|
||||||
if bans:
|
if bans:
|
||||||
ban = bans[0]
|
ban = bans[0]
|
||||||
reason = f"Remove the {ban.domain} link from your top friends list and try again."
|
reason = f"Remove the {ban.domain} link from your friends list and try again."
|
||||||
if ban.reason: reason += f" {ban.reason}"
|
if ban.reason: reason += f" {ban.reason}"
|
||||||
return {"error": reason}, 401
|
return {"error": reason}, 401
|
||||||
|
|
||||||
if len(friends_html) > 2000:
|
if len(friends_html) > 2000:
|
||||||
return render_template("settings_profile.html",
|
return render_template("settings_profile.html",
|
||||||
v=v,
|
v=v,
|
||||||
error="Your top friends list is too long")
|
error="Your friends list is too long")
|
||||||
|
|
||||||
|
|
||||||
notify_users = set()
|
notify_users = set()
|
||||||
|
@ -223,7 +223,7 @@ def settings_profile_post(v):
|
||||||
if request.host == 'rdrama.net' and 'aevann' in friends_html.lower() and 1 not in notify_users: notify_users.add(1)
|
if request.host == 'rdrama.net' and 'aevann' in friends_html.lower() and 1 not in notify_users: notify_users.add(1)
|
||||||
|
|
||||||
for x in notify_users:
|
for x in notify_users:
|
||||||
message = f"@{v.username} has added you to their top friends!"
|
message = f"@{v.username} has added you to their friends list!"
|
||||||
existing = g.db.query(Comment.id).options(lazyload('*')).filter(Comment.author_id == NOTIFICATIONS_ACCOUNT, Comment.body == message, Comment.notifiedto == x).first()
|
existing = g.db.query(Comment.id).options(lazyload('*')).filter(Comment.author_id == NOTIFICATIONS_ACCOUNT, Comment.body == message, Comment.notifiedto == x).first()
|
||||||
if not existing: send_notification(x, message)
|
if not existing: send_notification(x, message)
|
||||||
|
|
||||||
|
@ -233,9 +233,52 @@ def settings_profile_post(v):
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
return render_template("settings_profile.html",
|
return render_template("settings_profile.html",
|
||||||
v=v,
|
v=v,
|
||||||
msg="Your top friends have been updated.")
|
msg="Your friends list has been updated.")
|
||||||
|
|
||||||
|
|
||||||
|
if request.values.get("enemies"):
|
||||||
|
enemies = request.values.get("enemies")[:500]
|
||||||
|
|
||||||
|
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', enemies, re.MULTILINE):
|
||||||
|
if "wikipedia" not in i.group(1): enemies = enemies.replace(i.group(1), f'})')
|
||||||
|
|
||||||
|
enemies_html = CustomRenderer().render(mistletoe.Document(enemies))
|
||||||
|
enemies_html = sanitize(enemies_html)
|
||||||
|
bans = filter_comment_html(enemies_html)
|
||||||
|
|
||||||
|
if bans:
|
||||||
|
ban = bans[0]
|
||||||
|
reason = f"Remove the {ban.domain} link from your enemies list and try again."
|
||||||
|
if ban.reason: reason += f" {ban.reason}"
|
||||||
|
return {"error": reason}, 401
|
||||||
|
|
||||||
|
if len(enemies_html) > 2000:
|
||||||
|
return render_template("settings_profile.html",
|
||||||
|
v=v,
|
||||||
|
error="Your enemies list is too long")
|
||||||
|
|
||||||
|
|
||||||
|
notify_users = set()
|
||||||
|
soup = BeautifulSoup(enemies_html, features="html.parser")
|
||||||
|
for mention in soup.find_all("a", href=re.compile("^/@(\w+)")):
|
||||||
|
username = mention["href"].split("@")[1]
|
||||||
|
user = g.db.query(User).options(lazyload('*')).filter_by(username=username).first()
|
||||||
|
if user and not v.any_block_exists(user) and user.id != v.id: notify_users.add(user.id)
|
||||||
|
|
||||||
|
if request.host == 'rdrama.net' and 'aevann' in enemies_html.lower() and 1 not in notify_users: notify_users.add(1)
|
||||||
|
|
||||||
|
for x in notify_users:
|
||||||
|
message = f"@{v.username} has added you to their enemies list!"
|
||||||
|
existing = g.db.query(Comment.id).options(lazyload('*')).filter(Comment.author_id == NOTIFICATIONS_ACCOUNT, Comment.body == message, Comment.notifiedto == x).first()
|
||||||
|
if not existing: send_notification(x, message)
|
||||||
|
|
||||||
|
v.enemies = enemies[:500]
|
||||||
|
v.enemies_html=enemies_html
|
||||||
|
g.db.add(v)
|
||||||
|
g.db.commit()
|
||||||
|
return render_template("settings_profile.html",
|
||||||
|
v=v,
|
||||||
|
msg="Your enemies list has been updated.")
|
||||||
|
|
||||||
|
|
||||||
if request.values.get("bio") or request.files.get('file') and request.headers.get("cf-ipcountry") != "T1":
|
if request.values.get("bio") or request.files.get('file') and request.headers.get("cf-ipcountry") != "T1":
|
||||||
|
@ -728,14 +771,14 @@ def settings_css(v):
|
||||||
@auth_required
|
@auth_required
|
||||||
def settings_profilecss_get(v):
|
def settings_profilecss_get(v):
|
||||||
|
|
||||||
if v.coins < 1000 and not v.patron and v.admin_level < 6: return f"You must have +1000 {COINS_NAME} or be a patron to set profile css."
|
if v.truecoins < 1000 and not v.patron and v.admin_level < 6: return f"You must have +1000 {COINS_NAME} or be a patron to set profile css."
|
||||||
return render_template("settings_profilecss.html", v=v)
|
return render_template("settings_profilecss.html", v=v)
|
||||||
|
|
||||||
@app.post("/settings/profilecss")
|
@app.post("/settings/profilecss")
|
||||||
@limiter.limit("1/second")
|
@limiter.limit("1/second")
|
||||||
@auth_required
|
@auth_required
|
||||||
def settings_profilecss(v):
|
def settings_profilecss(v):
|
||||||
if v.coins < 1000 and not v.patron: return f"You must have +1000 {COINS_NAME} or be a patron to set profile css."
|
if v.truecoins < 1000 and not v.patron: return f"You must have +1000 {COINS_NAME} or be a patron to set profile css."
|
||||||
profilecss = request.values.get("profilecss").strip().replace('\\', '').strip()[:4000]
|
profilecss = request.values.get("profilecss").strip().replace('\\', '').strip()[:4000]
|
||||||
v.profilecss = profilecss
|
v.profilecss = profilecss
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
|
|
|
@ -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=110"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=96">
|
<link rel="stylesheet" href="/assets/css/main.css?v=111"><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=110"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
|
<link rel="stylesheet" href="/assets/css/main.css?v=111"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -326,6 +326,12 @@
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if c.author.sig_html and (c.author_id == 1904 or not (v and v.sigs_disabled)) %}
|
||||||
|
<hr>
|
||||||
|
{{c.author.sig_html | safe}}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{% if not c.parent_submission and c.author_id!=NOTIFICATIONS_ACCOUNT and c.author_id!=AUTOJANNY_ACCOUNT and c.author_id!=v.id %}
|
{% if not c.parent_submission and c.author_id!=NOTIFICATIONS_ACCOUNT and c.author_id!=AUTOJANNY_ACCOUNT and c.author_id!=v.id %}
|
||||||
<a class="btn btn-primary" href="javascript:void(0)" onclick="document.getElementById('reply-m-{{c.id}}').classList.toggle('d-none')">Reply</a>
|
<a class="btn btn-primary" href="javascript:void(0)" onclick="document.getElementById('reply-m-{{c.id}}').classList.toggle('d-none')">Reply</a>
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
|
|
|
@ -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=110">
|
<link rel="stylesheet" href="/assets/css/main.css?v=111">
|
||||||
<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=110"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
|
<link rel="stylesheet" href="/assets/css/main.css?v=111"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -459,41 +459,71 @@ line breaks
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<h2>Allowed Attributes</h2>
|
||||||
|
|
||||||
|
<table class="table table-striped mb-5">
|
||||||
|
<thead class="bg-primary text-white">
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>href</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>style</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>src</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>class</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>title</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>rel</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>data-bs-original-name</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>direction</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>behavior</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>scrollamount</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
<h2>Allowed Styles</h2>
|
<h2>Allowed Styles</h2>
|
||||||
|
|
||||||
<table class="table table-striped mb-5">
|
<table class="table table-striped mb-5">
|
||||||
<thead class="bg-primary text-white">
|
<thead class="bg-primary text-white">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Type</th>
|
|
||||||
<th>Displays as</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>color</td>
|
<td>color</td>
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>background-color</td>
|
<td>background-color</td>
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>font-weight</td>
|
<td>font-weight</td>
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>transform</td>
|
<td>transform</td>
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>-webkit-transform</td>
|
<td>-webkit-transform</td>
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -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=110"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=96">
|
<link rel="stylesheet" href="/assets/css/main.css?v=111"><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=110"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
|
<link rel="stylesheet" href="/assets/css/main.css?v=111"><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=110"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
|
<link rel="stylesheet" href="/assets/css/main.css?v=111"><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=110"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=96">
|
<link rel="stylesheet" href="/assets/css/main.css?v=111"><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=110"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=96">
|
<link rel="stylesheet" href="/assets/css/main.css?v=111"><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=110"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
|
<link rel="stylesheet" href="/assets/css/main.css?v=111"><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">
|
||||||
|
|
|
@ -590,7 +590,7 @@
|
||||||
|
|
||||||
<div class="body d-lg-flex border-bottom">
|
<div class="body d-lg-flex border-bottom">
|
||||||
|
|
||||||
<label class="text-black w-lg-25">Top friends</label>
|
<label class="text-black w-lg-25">Friends</label>
|
||||||
|
|
||||||
<div class="w-lg-100">
|
<div class="w-lg-100">
|
||||||
<form id="profile-friends" action="/settings/profile" method="post" enctype="multipart/form-data">
|
<form id="profile-friends" action="/settings/profile" method="post" enctype="multipart/form-data">
|
||||||
|
@ -609,6 +609,27 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="body d-lg-flex border-bottom">
|
||||||
|
|
||||||
|
<label class="text-black w-lg-25">Enemies</label>
|
||||||
|
|
||||||
|
<div class="w-lg-100">
|
||||||
|
<form id="profile-enemies" action="/settings/profile" method="post" enctype="multipart/form-data">
|
||||||
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||||
|
<div class="input-group mb-2">
|
||||||
|
<textarea id="enemies-text" class="form-control rounded" aria-label="With textarea" placeholder="Enter your top enemies on the site..." rows="3" name="enemies" form="profile-enemies" maxlength="1500">{% if v.enemies %}{{v.enemies}}{% endif %}</textarea>
|
||||||
|
</div>
|
||||||
|
<pre></pre>
|
||||||
|
<div class="d-flex">
|
||||||
|
<small>Limit of 500 characters</small>
|
||||||
|
<input class="btn btn-primary ml-auto" id="enemiesSave" type="submit" value="Save Changes">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{% if v.patron or v.id == 1904 %}
|
{% if v.patron or v.id == 1904 %}
|
||||||
<div class="body d-lg-flex border-bottom">
|
<div class="body d-lg-flex border-bottom">
|
||||||
<label class="text-black w-lg-25">Signature</label>
|
<label class="text-black w-lg-25">Signature</label>
|
||||||
|
|
|
@ -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=110"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
|
<link rel="stylesheet" href="/assets/css/main.css?v=111"><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=110"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
|
<link rel="stylesheet" href="/assets/css/main.css?v=111"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=96">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -517,6 +517,11 @@
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
{% if p.author.sig_html and (p.author_id == 1904 or not (v and v.sigs_disabled)) %}
|
||||||
|
<hr>
|
||||||
|
{{p.author.sig_html | safe}}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if p.is_banned and p.ban_reason %}
|
{% if p.is_banned and p.ban_reason %}
|
||||||
<div class="text-removed mb-0">removed by @{{p.ban_reason}}</div>
|
<div class="text-removed mb-0">removed by @{{p.ban_reason}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -489,6 +489,11 @@
|
||||||
{% if p.realbody(v) %}
|
{% if p.realbody(v) %}
|
||||||
<div class="d-none card rounded border pb-0 pt-3 my-2" id="post-text-{{p.id}}">
|
<div class="d-none card rounded border pb-0 pt-3 my-2" id="post-text-{{p.id}}">
|
||||||
{{p.realbody(v) | safe}}
|
{{p.realbody(v) | safe}}
|
||||||
|
|
||||||
|
{% if p.author.sig_html and (p.author_id == 1904 or not (v and v.sigs_disabled)) %}
|
||||||
|
<hr>
|
||||||
|
{{p.author.sig_html | safe}}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -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=110"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=96">
|
<link rel="stylesheet" href="/assets/css/main.css?v=111"><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=110">
|
<link rel="stylesheet" href="/assets/css/main.css?v=111">
|
||||||
<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 %}
|
||||||
|
@ -133,7 +133,7 @@
|
||||||
<label class="custom-control-label" for="privateCheck">Draft</label>
|
<label class="custom-control-label" for="privateCheck">Draft</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if v.admin_level == 6 or (v.coins >= 750 and not v.club_banned) %}
|
{% if v.admin_level == 6 or (v.truecoins >= 750 and not v.club_banned) %}
|
||||||
<div class="custom-control custom-checkbox">
|
<div class="custom-control custom-checkbox">
|
||||||
<input type="checkbox" class="custom-control-input" id="clubCheck" name="club">
|
<input type="checkbox" class="custom-control-input" id="clubCheck" name="club">
|
||||||
<label class="custom-control-label" for="clubCheck">Country Club thread</label>
|
<label class="custom-control-label" for="clubCheck">Country Club thread</label>
|
||||||
|
|
|
@ -177,10 +177,15 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if u.friends_html %}
|
{% if u.friends_html %}
|
||||||
<p class="text-muted font-weight-bold">Top friends:</p>
|
<p class="text-muted font-weight-bold">Friends:</p>
|
||||||
{{u.friends_html | safe}}
|
{{u.friends_html | safe}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if u.enemies_html %}
|
||||||
|
<p class="text-muted font-weight-bold">Enemies:</p>
|
||||||
|
{{u.enemies_html | safe}}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if u.received_awards %}
|
{% if u.received_awards %}
|
||||||
<div class="text-white rounded p-2 mb-3" style="background-color: rgba(50, 50, 50, 0.6); width: 30%;">
|
<div class="text-white rounded p-2 mb-3" style="background-color: rgba(50, 50, 50, 0.6); width: 30%;">
|
||||||
<p class="text-uppercase my-0" style="font-weight: bold; font-size: 12px;">Awards received</p>
|
<p class="text-uppercase my-0" style="font-weight: bold; font-size: 12px;">Awards received</p>
|
||||||
|
@ -448,10 +453,15 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if u.friends_html %}
|
{% if u.friends_html %}
|
||||||
<p class="text-muted font-weight-bold mt-3">Top friends:</p>
|
<p class="text-muted font-weight-bold mt-3">Friends:</p>
|
||||||
{{u.friends_html | safe}}
|
{{u.friends_html | safe}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if u.enemies_html %}
|
||||||
|
<p class="text-muted font-weight-bold mt-3">Enemies:</p>
|
||||||
|
{{u.enemies_html | safe}}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if u.received_awards %}
|
{% if u.received_awards %}
|
||||||
<div class="text-white rounded p-2 my-3 text-center" style="background-color: rgba(50, 50, 50, 0.6);">
|
<div class="text-white rounded p-2 my-3 text-center" style="background-color: rgba(50, 50, 50, 0.6);">
|
||||||
<p class="text-uppercase my-0" style="font-weight: bold; font-size: 12px;">Awards received</p>
|
<p class="text-uppercase my-0" style="font-weight: bold; font-size: 12px;">Awards received</p>
|
||||||
|
|
|
@ -820,6 +820,8 @@ CREATE TABLE public.users (
|
||||||
sig_html character varying(1000),
|
sig_html character varying(1000),
|
||||||
friends character varying(500),
|
friends character varying(500),
|
||||||
friends_html character varying(2000)
|
friends_html character varying(2000)
|
||||||
|
enemies character varying(500),
|
||||||
|
enemies_html character varying(2000)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue