master
Aevann1 2021-11-11 22:12:27 +02:00
parent cd7df62428
commit 2586c013d1
5 changed files with 57 additions and 44 deletions

View File

@ -774,7 +774,7 @@ def submit_post(v):
if (new_post.url or request.files.get('file')) and (v.is_activated or request.headers.get('cf-ipcountry')!="T1"):
if (new_post.url or request.files.get('file')) and request.headers.get('cf-ipcountry')!="T1":
gevent.spawn( thumbnail_thread, new_post.id)
if not new_post.private:

View File

@ -378,10 +378,12 @@
 
<small class="btn btn-secondary format d-inline-block m-0"><i class="fas fa-smile-beam" aria-hidden="true" onclick="loadEmojis('comment-edit-body-{{c.id}}')" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-toggle="tooltip" data-bs-placement="bottom" title="" data-bs-original-title="Add Emoji"></i></small>
&nbsp;
{% if request.headers.get('cf-ipcountry')!="T1" %}
<label class="btn btn-secondary format d-inline-block m-0" for="file-edit-reply-{{c.id}}">
<div id="filename-edit-reply-{{c.id}}"><i class="far fa-image"></i></div>
<input id="file-edit-reply-{{c.id}}" type="file" name="file" accept="image/*" onchange="document.getElementById('filename-edit-reply-{{c.id}}').innerHTML='image';" hidden>
</label>
{% endif %}
<a id="cancel-edit-{{c.id}}" href="javascript:void(0)" onclick="toggleEdit('{{c.id}}')" class="d-none d-md-block btn btn-link text-muted ml-auto cancel-form">Cancel</a>
<a href="javascript:void(0)" form="comment-edit-form-{{c.id}}" class="d-none d-md-block btn btn-primary ml-2" onclick="comment_edit('{{c.id}}')">Save Edit</a>
@ -539,10 +541,12 @@
<i id="emoji-reply-btn-{{c.fullname}}" class="fas fa-smile-beam" onclick="loadEmojis('reply-form-body-{{c.fullname}}')" aria-hidden="true" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-toggle="tooltip" data-bs-placement="bottom" title="" data-bs-original-title="Add Emoji"></i>
</label>
&nbsp;
{% if request.headers.get('cf-ipcountry')!="T1" %}
<label class="btn btn-secondary format d-inline-block m-0" for="file-upload-reply-{{c.fullname}}">
<div id="filename-show-reply-{{c.fullname}}"><i class="far fa-image"></i></div>
<input id="file-upload-reply-{{c.fullname}}" type="file" name="file" accept="image/*" onchange="document.getElementById('filename-show-reply-{{c.fullname}}').innerHTML='image';" hidden>
</label>
{% endif %}
<a href="javascript:void(0)" onclick="document.getElementById('reply-to-{{c.id}}').classList.add('d-none')" class="d-none d-md-block btn btn-link text-muted ml-auto cancel-form">Cancel</a>
<a id="save-reply-to-{{c.fullname}}" class="d-none d-md-block btn btn-primary text-muted ml-2" onclick="post_comment('{{c.fullname}}', '{{c.post.id}}');" href="javascript:void(0)">Comment</a>
</div>

View File

@ -205,6 +205,7 @@
<div class="d-flex">
{% if request.headers.get('cf-ipcountry')!="T1" %}
<div>
<form action="/settings/images/profile" method="post" enctype="multipart/form-data">
@ -215,6 +216,7 @@
</form>
</div>
{% endif %}
{% if v.profileurl %}
<div>
@ -248,6 +250,7 @@
<div class="d-flex">
{% if request.headers.get('cf-ipcountry')!="T1" %}
<div>
<form action="/settings/images/banner" method="post" enctype="multipart/form-data">
@ -258,6 +261,7 @@
</form>
</div>
{% endif %}
<div>
@ -572,10 +576,12 @@
&nbsp;
<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="" data-bs-original-title="Add Emoji"></pre>
&nbsp;
{% if request.headers.get('cf-ipcountry')!="T1" %}
<label class="btn btn-secondary format d-inline-block m-0">
<div id="filename-show"><i class="far fa-image"></i></div>
<input id="file-upload" type="file" name="file" accept="image/*" onchange="document.getElementById('filename-show').innerHTML='image';" hidden>
</label>
{% endif %}
</div>
<pre></pre>
<div class="d-flex">

View File

@ -832,10 +832,12 @@
<label class="btn btn-secondary format d-inline-block m-0" for="emoji-reply-btn-{{p.fullname}}">
<div id="emoji-reply-btn-{{p.fullname}}" onclick="loadEmojis('reply-form-body-{{p.fullname}}')" aria-hidden="true" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-toggle="tooltip" data-bs-placement="bottom" title="" data-bs-original-title="Add Emoji"><i class="fas fa-smile-beam"></i></div>
</label>
{% if request.headers.get('cf-ipcountry')!="T1" %}
<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 id="file-upload-reply-{{p.fullname}}" type="file" name="file" accept="image/*" onchange="document.getElementById('filename-show-reply-{{p.fullname}}').innerHTML='image';" hidden>
</label>
{% endif %}
<a id="save-reply-to-{{p.fullname}}" href="javascript:void(0)" form="reply-to-{{p.fullname}}" class="btn btn-primary text-whitebtn ml-auto" onclick="post_comment('{{p.fullname}}', '{{p.id}}')">Comment</a>
</div>
</form>

View File

@ -74,7 +74,7 @@
<input class="form-control" id="post-URL" aria-describedby="URLHelp" name="url" placeholder="Optional if you have text." value="{{request.values.get('url','')}}" required oninput="checkForRequired();autoSuggestTitle();hide_image()">
<small class="form-text text-muted">To post an image, use a direct image link such as i.imgur.com</small>
</div>
{% if request.headers.get('cf-ipcountry')!="T1" %}
<div id="image-upload-block">
<div><label class="mt-3">Attachment Upload</label></div>
@ -86,6 +86,7 @@
<small class="form-text text-muted">Optional if you have text.</small>
<small class="form-text text-muted">You can upload videos up to 1 minute long.</small>
</div>
{% endif %}
</div>
<label for="body" class="mt-3">Text<i class="fas fa-info-circle text-gray-400 ml-1" data-bs-toggle="tooltip" data-bs-placement="top" title="" data-bs-original-title="Uses markdown. Limited to 10000 characters."></i></label>