This commit is contained in:
Aevann1 2022-01-22 20:34:07 +02:00
parent 6b9596a743
commit cd56751347
17 changed files with 36 additions and 22 deletions

View file

@ -4599,8 +4599,8 @@ input[type=radio] ~ .custom-control-label::before {
width: 60px !important; width: 60px !important;
} }
.emj, .emoji, .bigemoji, .emoji-md, .emoji-lg { .emj, .emoji, .bigemoji, .emoji-md, .emoji-lg {
max-width: min(150px,50%) !important; max-width: min(150px,30%) !important;
max-height: min(150px,50%) !important; max-height: min(150px,30%) !important;
display: inline-block; display: inline-block;
-o-object-fit: contain; -o-object-fit: contain;
object-fit: contain; object-fit: contain;

View file

@ -73,8 +73,14 @@ function report_commentModal(id, author) {
function openReplyBox(id) { function openReplyBox(id) {
const element = document.getElementById(id); const element = document.getElementById(id);
const textarea = element.getElementsByTagName('textarea')[0] const textarea = element.getElementsByTagName('textarea')[0]
const text = window.getSelection().toString() let text = getSelection().toString()
if (text) textarea.value = `>${text}` if (text)
{
text = text.replace(/\n\n/g,"\n\n>")
if (!text.endsWith('\n\n')) text += '\n\n'
text = text.replace(/\n\n>\n\n/g,"\n\n")
textarea.value = `>${text}`
}
element.classList.remove('d-none') element.classList.remove('d-none')
textarea.focus() textarea.focus()
} }

View file

@ -14,6 +14,9 @@ if (u_username)
{ {
audio.play() audio.play()
localStorage.setItem("playing", "1") localStorage.setItem("playing", "1")
window.addEventListener("unload", function(e) {
localStorage.setItem("playing", "")
});
} }
else else
{ {
@ -53,6 +56,9 @@ else
audio.play() audio.play()
localStorage.setItem("paused", "") localStorage.setItem("paused", "")
localStorage.setItem("playing", "1") localStorage.setItem("playing", "1")
window.addEventListener("unload", function(e) {
localStorage.setItem("playing", "")
});
} }
else else
{ {

View file

@ -111,6 +111,8 @@ def post_id(pid, anything=None, v=None):
if post.club and not (v and (v.paid_dues or v.id == post.author_id)): abort(403) if post.club and not (v and (v.paid_dues or v.id == post.author_id)): abort(403)
if post.private and not (v and (v.admin_level > 1 or v.id == post.author.id)): abort(403)
if v: if v:
votes = g.db.query(CommentVote).filter_by(user_id=v.id).subquery() votes = g.db.query(CommentVote).filter_by(user_id=v.id).subquery()

View file

@ -15,7 +15,7 @@
{% if v %} {% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style> <style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=93"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=14"> <link rel="stylesheet" href="/static/assets/css/main.css?a=94"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=14">
{% if v.agendaposter %} {% if v.agendaposter %}
<style> <style>
html { html {
@ -39,7 +39,7 @@
{% endif %} {% endif %}
{% else %} {% else %}
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style> <style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=93"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=14"> <link rel="stylesheet" href="/static/assets/css/main.css?a=94"><link rel="stylesheet" href="/static/assets/css/{{'DEFAULT_THEME' | app_config}}.css?a=14">
{% endif %} {% endif %}
</head> </head>

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -698,7 +698,7 @@
<div id="username" class="d-none">{{u.username}}</div> <div id="username" class="d-none">{{u.username}}</div>
{% endif %} {% endif %}
<script src="/static/assets/js/userpage.js?a=220"></script> <script src="/static/assets/js/userpage.js?a=221"></script>
{% endblock %} {% endblock %}

View file

@ -114,5 +114,5 @@
<div id="username" class="d-none">{{u.username}}</div> <div id="username" class="d-none">{{u.username}}</div>
{% endif %} {% endif %}
<script src="/static/assets/js/userpage.js?a=220"></script> <script src="/static/assets/js/userpage.js?a=221"></script>
{% endblock %} {% endblock %}

View file

@ -48,5 +48,5 @@
<div id="username" class="d-none">{{u.username}}</div> <div id="username" class="d-none">{{u.username}}</div>
{% endif %} {% endif %}
<script src="/static/assets/js/userpage.js?a=220"></script> <script src="/static/assets/js/userpage.js?a=221"></script>
{% endblock %} {% endblock %}