big ass commit
parent
9796d359c4
commit
0a74a98ec5
|
@ -10,7 +10,7 @@ COPY requirements.txt /etc/requirements.txt
|
|||
|
||||
RUN pip3 install -r /etc/requirements.txt
|
||||
|
||||
RUN mkdir /images && mkdir /songs && mkdir /videos
|
||||
RUN mkdir /images && mkdir /songs && mkdir /videos && mkdir /audio
|
||||
|
||||
EXPOSE 80/tcp
|
||||
|
||||
|
|
|
@ -869,6 +869,7 @@ proxies = {"http":"http://127.0.0.1:18080","https":"http://127.0.0.1:18080"}
|
|||
blackjack = environ.get("BLACKJACK", "").strip()
|
||||
|
||||
approved_embed_hosts = [
|
||||
SITE,
|
||||
'rdrama.net',
|
||||
'pcmemes.net',
|
||||
'cringetopia.org',
|
||||
|
@ -935,6 +936,7 @@ image_check_regex = re.compile(f'!\[\]\(((?!(https:\/\/([a-z0-9-]+\.)*({hosts})\
|
|||
embed_fullmatch_regex = re.compile(f'https:\/\/([a-z0-9-]+\.)*({hosts})\/[\w:~,()\-.#&\/=?@%;+]*', flags=re.A)
|
||||
|
||||
video_sub_regex = re.compile(f'(<p>[^<]*)(https:\/\/([a-z0-9-]+\.)*({hosts})\/[\w:~,()\-.#&\/=?@%;+]*?\.(mp4|webm|mov))', flags=re.A)
|
||||
audio_sub_regex = re.compile(f'(<p>[^<]*)(https:\/\/([a-z0-9-]+\.)*({hosts})\/[\w:~,()\-.#&\/=?@%;+]*?\.(mp3|wav|ogg|aac))', flags=re.A)
|
||||
|
||||
imgur_regex = re.compile('(https://i\.imgur\.com/([a-z0-9]+))\.(jpg|png|jpeg|webp)(?!<\/(code|pre|a)>)', flags=re.I|re.A)
|
||||
|
||||
|
|
|
@ -8,6 +8,17 @@ import requests
|
|||
import time
|
||||
from .const import *
|
||||
|
||||
|
||||
def process_audio(patron, file):
|
||||
name = f'/audio/{time.time()}'.replace('.','') + '.mp3'
|
||||
file.save(name)
|
||||
size = os.stat(name).st_size
|
||||
if size > 16 * 1024 * 1024 or not patron and size > 8 * 1024 * 1024:
|
||||
os.remove(name)
|
||||
abort(413)
|
||||
return f'{SITE_FULL}{name}'
|
||||
|
||||
|
||||
def process_video(file):
|
||||
name = f'/videos/{time.time()}'.replace('.','')
|
||||
file.save(name)
|
||||
|
|
|
@ -249,6 +249,7 @@ def sanitize(sanitized, alert=False, comment=False, edit=False):
|
|||
sanitized = sanitized.replace(i.group(0), htmlsource)
|
||||
|
||||
sanitized = video_sub_regex.sub(r'\1<video controls preload="none"><source src="\2"></video>', sanitized)
|
||||
sanitized = audio_sub_regex.sub(r'\1<audio controls preload="none" src="\2"></audio>', sanitized)
|
||||
|
||||
if comment:
|
||||
for marsey in g.db.query(Marsey).filter(Marsey.name.in_(marseys_used)).all():
|
||||
|
|
|
@ -310,7 +310,9 @@ def api_comment(v):
|
|||
value = process_video(file)
|
||||
if type(value) is str: body += f"\n\n{value}"
|
||||
else: return value
|
||||
else: return {"error": "Image/Video files only"}, 400
|
||||
elif file.content_type.startswith('audio/'):
|
||||
body += f"\n\n{process_audio(v.patron, file)}"
|
||||
else: return {"error": "Image/Video/Audio files only"}, 400
|
||||
|
||||
body = body.strip()
|
||||
|
||||
|
@ -768,7 +770,9 @@ def edit_comment(cid, v):
|
|||
value = process_video(file)
|
||||
if type(value) is str: body += f"\n\n{value}"
|
||||
else: return value
|
||||
else: return {"error": "Image/Video files only"}, 400
|
||||
elif file.content_type.startswith('audio/'):
|
||||
body += f"\n\n{process_audio(v.patron, file)}"
|
||||
else: return {"error": "Image/Video/Audio files only"}, 400
|
||||
|
||||
body = body.strip()
|
||||
|
||||
|
|
|
@ -47,9 +47,9 @@ def error_405(e):
|
|||
|
||||
@app.errorhandler(413)
|
||||
def error_413(e):
|
||||
return {"error": "Max image size is 8 MB (16 MB for paypigs)"}, 413
|
||||
return {"error": "Max image/audio size is 8 MB (16 MB for paypigs)"}, 413
|
||||
if request.headers.get("Authorization") or request.headers.get("xhr"):
|
||||
return {"error": "Max image size is 8 MB (16 MB for paypigs)"}, 413
|
||||
return {"error": "Max image/audio size is 8 MB (16 MB for paypigs)"}, 413
|
||||
else: return render_template('errors/413.html', err=True), 413
|
||||
|
||||
@app.errorhandler(429)
|
||||
|
|
|
@ -467,7 +467,9 @@ def edit_post(pid, v):
|
|||
value = process_video(file)
|
||||
if type(value) is str: body += f"\n\n{value}"
|
||||
else: return value
|
||||
else: return {"error": "Image/Video files only"}, 400
|
||||
elif file.content_type.startswith('audio/'):
|
||||
body += f"\n\n{process_audio(v.patron, file)}"
|
||||
else: return {"error": "Image/Video/Audio files only"}, 400
|
||||
|
||||
body = body.strip()
|
||||
|
||||
|
@ -1078,8 +1080,10 @@ def submit_post(v, sub=None):
|
|||
value = process_video(file)
|
||||
if type(value) is str: body += f"\n\n{value}"
|
||||
else: return error(value['error'])
|
||||
elif file.content_type.startswith('audio/'):
|
||||
body += f"\n\n{process_audio(v.patron, file)}"
|
||||
else:
|
||||
return error("Image/Video files only.")
|
||||
return error("Image/Video/Audio files only.")
|
||||
|
||||
body = body.strip()
|
||||
|
||||
|
@ -1181,8 +1185,10 @@ def submit_post(v, sub=None):
|
|||
value = process_video(file)
|
||||
if type(value) is str: post.url = value
|
||||
else: return error(value['error'])
|
||||
elif file.content_type.startswith('audio/'):
|
||||
post.url = process_audio(v.patron, file)
|
||||
else:
|
||||
return error("Image/Video files only.")
|
||||
return error("Image/Video/Audio files only.")
|
||||
|
||||
if not post.thumburl and post.url:
|
||||
gevent.spawn(thumbnail_thread, post.id)
|
||||
|
|
|
@ -220,9 +220,11 @@ def settings_profile_post(v):
|
|||
value = process_video(file)
|
||||
if type(value) is str: bio += f"\n\n{value}"
|
||||
else: return value
|
||||
elif file.content_type.startswith('audio/'):
|
||||
bio += f"\n\n{process_audio(v.patron, file)}"
|
||||
else:
|
||||
if request.headers.get("Authorization") or request.headers.get("xhr"): return {"error": "Image/Video files only"}, 400
|
||||
return render_template("settings_profile.html", v=v, error="Image/Video files only."), 400
|
||||
if request.headers.get("Authorization") or request.headers.get("xhr"): return {"error": "Image/Video/Audio files only"}, 400
|
||||
return render_template("settings_profile.html", v=v, error="Image/Video/Audio files only."), 400
|
||||
|
||||
bio = bio.strip()
|
||||
|
||||
|
|
|
@ -407,7 +407,9 @@ def submit_contact(v):
|
|||
value = process_video(file)
|
||||
if type(value) is str: body_html += f"<p>{value}</p>"
|
||||
else: return value
|
||||
else: return {"error": "Image/Video files only"}, 400
|
||||
elif file.content_type.startswith('audio/'):
|
||||
body_html += f"<p>{process_audio(v.patron, file)}</p>"
|
||||
else: return {"error": "Image/Video/Audio files only"}, 400
|
||||
|
||||
|
||||
|
||||
|
@ -488,6 +490,16 @@ def videos(path):
|
|||
resp.headers.add("Content-Type", "video/mp4")
|
||||
return resp
|
||||
|
||||
@app.get('/audio/<path>')
|
||||
@limiter.exempt
|
||||
def audio(path):
|
||||
resp = make_response(send_from_directory('/audio', path.replace('.mp3','.mp3')))
|
||||
resp.headers.remove("Cache-Control")
|
||||
resp.headers.add("Cache-Control", "public, max-age=3153600")
|
||||
resp.headers.remove("Content-Type")
|
||||
resp.headers.add("Content-Type", "audio/mpeg")
|
||||
return resp
|
||||
|
||||
@app.get("/robots.txt")
|
||||
def robots_txt():
|
||||
try: f = send_file("assets/robots.txt")
|
||||
|
|
|
@ -704,7 +704,9 @@ def messagereply(v):
|
|||
value = process_video(file)
|
||||
if type(value) is str: body_html += f"<p>{value}</p>"
|
||||
else: return value
|
||||
else: return {"error": "Image/Video files only"}, 400
|
||||
elif file.content_type.startswith('audio/'):
|
||||
body_html += f"<p>{process_audio(v.patron, file)}</p>"
|
||||
else: return {"error": "Image/Video/Audio files only"}, 400
|
||||
|
||||
|
||||
c = Comment(author_id=v.id,
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
{% if v %}
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=271">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=272">
|
||||
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=57">
|
||||
{% if v.agendaposter %}
|
||||
<style>
|
||||
|
@ -40,7 +40,7 @@
|
|||
{% endif %}
|
||||
{% else %}
|
||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=271">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=272">
|
||||
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<title>Chat</title>
|
||||
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=271">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=272">
|
||||
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=57">
|
||||
{% if v.css %}
|
||||
<link rel="stylesheet" href="/@{{v.username}}/css">
|
||||
|
|
|
@ -313,8 +313,8 @@
|
|||
|
||||
|
||||
<label class="btn btn-secondary format m-0" for="file-edit-reply-{{c.id}}">
|
||||
<div id="filename-edit-reply-{{c.id}}"><i class="far fa-image"></i></div>
|
||||
<input autocomplete="off" id="file-edit-reply-{{c.id}}" type="file" multiple="multiple" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename-edit-reply-{{c.id}}','file-edit-reply-{{c.id}}')" hidden>
|
||||
<div id="filename-edit-reply-{{c.id}}"><i class="fas fa-file"></i></div>
|
||||
<input autocomplete="off" id="file-edit-reply-{{c.id}}" type="file" multiple="multiple" name="file" accept="image/*, video/*, audio/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename-edit-reply-{{c.id}}','file-edit-reply-{{c.id}}')" hidden>
|
||||
</label>
|
||||
</div>
|
||||
<a id="edit-btn-{{c.id}}" role="button" form="comment-edit-form-{{c.id}}" class="btn btn-primary ml-2 fl-r commentmob" onclick="comment_edit('{{c.id}}')">Save Edit</a>
|
||||
|
@ -564,8 +564,8 @@
|
|||
</label>
|
||||
|
||||
<label class="btn btn-secondary format m-0" for="file-upload-reply-{{c.fullname}}">
|
||||
<div id="filename-show-reply-{{c.fullname}}"><i class="far fa-image"></i></div>
|
||||
<input autocomplete="off" id="file-upload-reply-{{c.fullname}}" type="file" multiple="multiple" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename-show-reply-{{c.fullname}}','file-upload-reply-{{c.fullname}}')" hidden>
|
||||
<div id="filename-show-reply-{{c.fullname}}"><i class="fas fa-file"></i></div>
|
||||
<input autocomplete="off" id="file-upload-reply-{{c.fullname}}" type="file" multiple="multiple" name="file" accept="image/*, video/*, audio/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename-show-reply-{{c.fullname}}','file-upload-reply-{{c.fullname}}')" hidden>
|
||||
</label>
|
||||
</div>
|
||||
<a id="save-reply-to-{{c.fullname}}" class="btn btn-primary ml-2 fl-r commentmob" onclick="post_comment('{{c.fullname}}', '{{c.post.id}}')"role="button">Comment</a>
|
||||
|
@ -603,8 +603,8 @@
|
|||
|
||||
{% if c.sentto == 2 %}
|
||||
<label class="btn btn-secondary m-0 mt-3" for="file-upload">
|
||||
<div id="filename"><i class="far fa-image"></i></div>
|
||||
<input autocomplete="off" id="file-upload" type="file" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename','file-upload')" hidden>
|
||||
<div id="filename"><i class="fas fa-file"></i></div>
|
||||
<input autocomplete="off" id="file-upload" type="file" name="file" accept="image/*, video/*, audio/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename','file-upload')" hidden>
|
||||
</label>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
<i class="fas fa-smile-beam"></i>
|
||||
</label>
|
||||
<label class="btn btn-secondary m-0 mt-3" for="file-upload">
|
||||
<div id="filename"><i class="far fa-image"></i></div>
|
||||
<input autocomplete="off" id="file-upload" type="file" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename','file-upload')" hidden>
|
||||
<div id="filename"><i class="fas fa-file"></i></div>
|
||||
<input autocomplete="off" id="file-upload" type="file" name="file" accept="image/*, video/*, audio/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename','file-upload')" hidden>
|
||||
</label>
|
||||
<input type="submit" value="Submit" class="btn btn-primary mt-3">
|
||||
</form>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<script src="/assets/js/shortcut handler.js?v=2"></script>
|
||||
{% if v %}
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=271">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=272">
|
||||
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=58">
|
||||
<link rel="stylesheet" href="/assets/css/awards.css?v=4">
|
||||
{% if v.agendaposter %}
|
||||
|
@ -34,7 +34,7 @@
|
|||
{% endif %}
|
||||
{% else %}
|
||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=271">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=272">
|
||||
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
|
||||
<link rel="stylesheet" href="/assets/css/awards.css?v=4">
|
||||
{% endif %}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
{% block content %}
|
||||
{% if v %}
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=271">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=272">
|
||||
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=57">
|
||||
{% if v.agendaposter %}
|
||||
<style>
|
||||
|
@ -31,7 +31,7 @@
|
|||
{% endif %}
|
||||
{% else %}
|
||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=271">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=272">
|
||||
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
{% endblock %}
|
||||
|
||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=271">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=272">
|
||||
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
|
||||
|
||||
</head>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<title>2-Step Login - {{SITE_NAME}}</title>
|
||||
|
||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=271">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=272">
|
||||
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
|
||||
|
||||
</head>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=271">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=272">
|
||||
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=57">
|
||||
{% if v.agendaposter %}
|
||||
<style>
|
||||
|
|
|
@ -39,11 +39,11 @@
|
|||
|
||||
{% if v %}
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=271">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=272">
|
||||
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=57">
|
||||
{% else %}
|
||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=271">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=272">
|
||||
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
|
||||
{% endif %}
|
||||
</head>
|
||||
|
|
|
@ -592,8 +592,8 @@
|
|||
<pre style="padding-top:0.7rem" class="btn btn-secondary format d-inline-block m-0 fas fa-smile-beam" onclick="loadEmojis('bio-text')" aria-hidden="true" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Add Emoji"></pre>
|
||||
|
||||
<label class="btn btn-secondary format d-inline-block m-0">
|
||||
<div id="filename-show"><i class="far fa-image"></i></div>
|
||||
<input autocomplete="off" id="file-upload" type="file" name="file" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} accept="image/*, video/*" onchange="changename('filename-show','file-upload')" hidden>
|
||||
<div id="filename-show"><i class="fas fa-file"></i></div>
|
||||
<input autocomplete="off" id="file-upload" type="file" name="file" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} accept="image/*, video/*, audio/*" onchange="changename('filename-show','file-upload')" hidden>
|
||||
</label>
|
||||
</div>
|
||||
<pre></pre>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}Sign up - {{SITE_NAME}}{% endif %}</title>
|
||||
|
||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=271">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=272">
|
||||
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
|
||||
|
||||
</head>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %}</title>
|
||||
|
||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=271">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=272">
|
||||
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
|
||||
|
||||
</head>
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
{% endif %}
|
||||
|
||||
{% if p.award_count("firework") %}
|
||||
<script defer src="/assets/js/fireworks.js?v=1"></script>
|
||||
<script defer src="/assets/js/fireworks.js?v=2"></script>
|
||||
<div class="firework">
|
||||
<img src="">
|
||||
</div>
|
||||
|
@ -95,20 +95,20 @@
|
|||
{% endif %}
|
||||
|
||||
{% if p.award_count("ricardo") %}
|
||||
<script src="/assets/js/ricardo.js"></script>
|
||||
<script src="/assets/js/ricardo.js?v=1"></script>
|
||||
<div id="ricardo1" class="ricardo ricardoleft">
|
||||
<img src="/assets/images/ricardo1.gif">
|
||||
<img src="/assets/images/ricardo1.webp">
|
||||
</div>
|
||||
|
||||
{% if p.award_count("ricardo") > 1 %}
|
||||
<div id="ricardo2" class="ricardo">
|
||||
<img src="/assets/images/ricardo2.gif" style="max-height:200px">
|
||||
<img src="/assets/images/ricardo2.webp" style="max-height:200px">
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if p.award_count("ricardo") > 2 %}
|
||||
<div id="ricardo3" class="ricardo">
|
||||
<img src="/assets/images/ricardo3.gif" style="max-height:150px">
|
||||
<img src="/assets/images/ricardo3.webp" style="max-height:150px">
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -823,8 +823,8 @@
|
|||
<div onclick="loadEmojis('post-edit-box-{{p.id}}')" class="format btn btn-secondary" role="button" aria-hidden="true" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Add Emoji"><i class="fas fa-smile-beam"></i></div>
|
||||
|
||||
<label class="format btn btn-secondary m-0 ml-1 {% if v %}d-inline-block{% else %}d-none{% endif %}" for="file-upload-edit-{{p.id}}">
|
||||
<div id="filename-show-edit-{{p.id}}"><i class="far fa-image"></i></div>
|
||||
<input autocomplete="off" id="file-upload-edit-{{p.id}}" type="file" multiple="multiple" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename-show-edit-{{p.id}}','file-upload-edit-{{p.id}}')" hidden>
|
||||
<div id="filename-show-edit-{{p.id}}"><i class="fas fa-file"></i></div>
|
||||
<input autocomplete="off" id="file-upload-edit-{{p.id}}" type="file" multiple="multiple" name="file" accept="image/*, video/*, audio/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename-show-edit-{{p.id}}','file-upload-edit-{{p.id}}')" hidden>
|
||||
</label>
|
||||
|
||||
<small class="format d-none"><i class="fas fa-link" aria-hidden="true"></i></small>
|
||||
|
@ -1021,8 +1021,8 @@
|
|||
<div onclick="loadEmojis('reply-form-body-{{p.fullname}}')" class="btn btn-secondary format d-inline-block m-0" id="emoji-reply-btn-{{p.fullname}}" aria-hidden="true" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Add Emoji"><i class="fas fa-smile-beam"></i></div>
|
||||
|
||||
<label class="format btn btn-secondary m-0 ml-1 {% if v %}d-inline-block{% else %}d-none{% endif %}" for="file-upload-reply-{{p.fullname}}">
|
||||
<div id="filename-show-reply-{{p.fullname}}"><i class="far fa-image"></i></div>
|
||||
<input autocomplete="off" id="file-upload-reply-{{p.fullname}}" type="file" multiple="multiple" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename-show-reply-{{p.fullname}}','file-upload-reply-{{p.fullname}}')" hidden>
|
||||
<div id="filename-show-reply-{{p.fullname}}"><i class="fas fa-file"></i></div>
|
||||
<input autocomplete="off" id="file-upload-reply-{{p.fullname}}" type="file" multiple="multiple" name="file" accept="image/*, video/*, audio/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename-show-reply-{{p.fullname}}','file-upload-reply-{{p.fullname}}')" hidden>
|
||||
</label>
|
||||
</div>
|
||||
<a id="save-reply-to-{{p.fullname}}" role="button" form="reply-to-{{p.fullname}}" class="btn btn-primary text-whitebtn ml-auto fl-r" onclick="post_comment('{{p.fullname}}', '{{p.id}}')">Comment</a>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
{% block stylesheets %}
|
||||
{% if v %}
|
||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=271">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=272">
|
||||
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=49">
|
||||
{% if v.agendaposter %}
|
||||
<style>
|
||||
|
@ -51,7 +51,7 @@
|
|||
{% endif %}
|
||||
{% else %}
|
||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=271">
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=272">
|
||||
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=49">
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
@ -109,7 +109,7 @@
|
|||
<img loading="lazy" id="image-preview" style="max-width:50%">
|
||||
<label class="btn btn-secondary m-0" for="file-upload">
|
||||
<div id="filename-show">Select File</div>
|
||||
<input autocomplete="off" id="file-upload" type="file" name="file" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} accept="image/*, video/*" hidden>
|
||||
<input autocomplete="off" id="file-upload" type="file" name="file" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} accept="image/*, video/*, audio/*" hidden>
|
||||
</label>
|
||||
<small class="form-text text-muted">Optional if you have text.</small>
|
||||
<small class="form-text text-muted">You can upload images or videos up to 60 seconds.</small>
|
||||
|
@ -147,8 +147,8 @@
|
|||
<div onclick="loadEmojis('post-text')" class="btn btn-secondary format d-inline-block m-0" id="emoji-reply-btn" aria-hidden="true" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Add Emoji"><i class="fas fa-smile-beam"></i></div>
|
||||
|
||||
<label class="format btn btn-secondary m-0 ml-1 {% if v %}d-inline-block{% else %}d-none{% endif %}" for="file-upload-submit">
|
||||
<div id="filename-show-submit"><i class="far fa-image"></i></div>
|
||||
<input autocomplete="off" id="file-upload-submit" multiple="multiple" type="file" name="file2" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename-show-submit','file-upload-submit');checkForRequired()" hidden>
|
||||
<div id="filename-show-submit"><i class="fas fa-file"></i></div>
|
||||
<input autocomplete="off" id="file-upload-submit" multiple="multiple" type="file" name="file2" accept="image/*, video/*, audio/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename-show-submit','file-upload-submit');checkForRequired()" hidden>
|
||||
</label>
|
||||
|
||||
<div id="preview" class="preview my-3"></div>
|
||||
|
|
|
@ -12,6 +12,7 @@ pip3 install -r requirements.txt
|
|||
mkdir /songs
|
||||
mkdir /images
|
||||
mkdir /videos
|
||||
mkdir /audio
|
||||
snap install opera-proxy
|
||||
ufw allow ssh
|
||||
ufw allow from 173.245.48.0/20
|
||||
|
|
Loading…
Reference in New Issue