remotes/1693045480750635534/spooky-22
Aevann1 2021-07-27 23:35:50 +02:00
parent 2747d41c5a
commit f73362cab2
13 changed files with 88 additions and 143 deletions

1
.github/FUNDING.yml vendored
View File

@ -1,3 +1,2 @@
github: Aevann1
patreon: Aevann
custom: ["https://rdrama.gumroad.com/l/tfcvri"]

View File

@ -384,7 +384,6 @@ def api_comment(v):
)
g.db.add(c)
g.db.flush()
if v.dramacoins >= 0:
if request.files.get("file"):
file=request.files["file"]
if not file.content_type.startswith('image/'):
@ -738,7 +737,6 @@ def edit_comment(cid, v):
g.db.commit()
return jsonify({"error": "Too much spam!"}), 403
if v.dramacoins >= 0:
if request.files.get("file"):
file=request.files["file"]
if not file.content_type.startswith('image/'):

View File

@ -867,10 +867,6 @@ def submit_post(v):
# check for embeddable video
domain = parsed_url.netloc
if request.files.get('file') and not v.dramacoins >= 0:
abort(403)
new_post = Submission(
private=bool(request.form.get("private","")),
author_id=v.id,

View File

@ -324,7 +324,6 @@ def settings_log_out_others(v):
@auth_required
@validate_formkey
def settings_images_profile(v):
if v.dramacoins >= 0:
if request.content_length > 16 * 1024 * 1024:
g.db.rollback()
@ -339,15 +338,11 @@ def settings_images_profile(v):
return render_template("settings_profile.html",
v=v, msg="Profile picture successfully updated.")
return render_template("settings_profile.html", v=v,
msg="Avatars require +0 dramacoins.")
@app.route("/settings/images/banner", methods=["POST"])
@auth_required
@validate_formkey
def settings_images_banner(v):
if v.dramacoins >= 0:
if request.content_length > 16 * 1024 * 1024:
g.db.rollback()
abort(413)
@ -361,9 +356,6 @@ def settings_images_banner(v):
return render_template("settings_profile.html",
v=v, msg="Banner successfully updated.")
return render_template("settings_profile.html", v=v,
msg="Banners require +0 dramacoins.")
@app.route("/settings/delete/profile", methods=["POST"])
@auth_required

View File

@ -192,7 +192,7 @@
<strong style="color: #999b2e;"><i class="far fa-fw fa-flag"></i> Reported by:</strong>
<ul style="margin-bottom: 0;">
{% for f in c.flags %}
<li><a href="{{ f.user.url }}">@{{ f.user.username }}</a>: "{{f.reason}}"</li>
<li><a href="{{ f.user.url }}">@{{ f.user.username }}</a>: {{f.reason}}</li>
{% endfor %}
</ul>
</div>

View File

@ -14,8 +14,6 @@
<h1 class="h5">401 Not Authorized</h1>
<p class="text-muted">You have 0 ban awards (they're a patron perk):</p>
<a href="https://rdrama.gumroad.com/l/tfcvri">https://rdrama.gumroad.com/l/tfcvri</a>
<br>
<a href="https://patreon.com/Aevann">https://patreon.com/Aevann</a>
</div>
</div>
</div>

View File

@ -14,8 +14,6 @@
<h1 class="h5">401 Not Authorized</h1>
<p class="text-muted">This page is only available to patrons:</p>
<a href="https://rdrama.gumroad.com/l/tfcvri">https://rdrama.gumroad.com/l/tfcvri</a>
<br>
<a href="https://patreon.com/Aevann">https://patreon.com/Aevann</a>
</div>
</div>
</div>

View File

@ -107,7 +107,6 @@
<a class="dropdown-item" href="/changelog"><i class="fas fa-clipboard fa-fw text-left mr-3"></i>Changelog</a>
<a class="dropdown-item" href="https://github.com/Aevann1/Drama"><i class="fab fa-github fa-fw text-left mr-3"></i>Source code</a>
<a class="dropdown-item" href="/discord"><i class="fab fa-discord fa-fw text-left mr-3"></i>Discord</a>
<a class="dropdown-item" href="https://patreon.com/Aevann"><i class="fab fa-patreon fa-fw text-left mr-3"></i>Patreon</a>
<a class="dropdown-item" href="https://rdrama.gumroad.com/l/tfcvri"><i class="fas fa-dollar-sign fa-fw text-left mr-3"></i>Gumroad</a>
<a class="dropdown-item" href="/archives"><i class="fas fa-book fa-fw text-left mr-3"></i>Subreddit Archives</a>
<a class="dropdown-item" href="/contact"><i class="fas fa-file-signature fa-fw text-left mr-3"></i>Contact us</a>
@ -163,7 +162,6 @@
<li class="nav-item"><a class="nav-link" href="/post/1xq/posting-guidelines-policies-legal-shit"><i class="fas fa-balance-scale fa-fw mr-3"></i>Rules</a></li>
<li class="nav-item"><a class="nav-link" href="https://github.com/Aevann1/Drama"><i class="fab fa-github fa-fw mr-3"></i>Source code</a></li>
<li class="nav-item"><a class="nav-link" href="/discord"><i class="fab fa-discord fa-fw mr-3"></i>Discord</a></li>
<li class="nav-item"><a class="nav-link" href="https://patreon.com/Aevann"><i class="fab fa-patreon fa-fw mr-3"></i>Patreon</a></li>
<li class="nav-item"><a class="nav-link" href="https://rdrama.gumroad.com/l/tfcvri"><i class="fas fa-dollar-sign fa-fw mr-3"></i>Gumroad</a></li>
<li class="nav-item"><a class="nav-link" href="/archives"><i class="fas fa-book fa-fw mr-3"></i>Subreddit Archives</a></li>
<li class="nav-item"><a class="nav-link" href="/contact"><i class="fas fa-file-signature fa-fw mr-3"></i>Contact us</a></li>

View File

@ -84,8 +84,6 @@
<div>
{% if v.dramacoins >= 0 %}
<form action="/settings/images/profile" method="post" enctype="multipart/form-data">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
@ -93,12 +91,6 @@
</label>
</form>
{% else %}
<div class="text-muted">You can add a custom avatar after earning 30 Dramacoins.{% if request.headers.get("cf-ipcountry")=="T1" and not v.is_activated %} Additionally, you must have a verified email address to upload images via Tor.{% endif %}</div>
{% endif %}
</div>
{% if v.profileurl %}
@ -112,12 +104,8 @@
</div>
{% if v.dramacoins >= 0 %}
<div class="text-small-extra text-muted mt-3">JPG, PNG, GIF files are supported. Max file size is 16 MB.</div>
{% endif %}
</div>
</div>
@ -139,8 +127,6 @@
<div>
{% if v.dramacoins >= 0 %}
<form action="/settings/images/banner" method="post" enctype="multipart/form-data">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
@ -148,12 +134,6 @@
</label>
</form>
{% else %}
<div class="text-muted">You can add a custom banner after earning 30 Dramacoins.{% if request.headers.get("cf-ipcountry")=="T1" and not v.is_activated %} Additionally, you must have a verified email address to upload images via Tor.{% endif %}</div>
{% endif %}
</div>
<div>
@ -168,12 +148,8 @@
</div>
{% if v.dramacoins >= 0 %}
<div class="text-small-extra text-muted mt-3">JPG, PNG, GIF files are supported. Max file size is 16 MB.</div>
{% endif %}
</div>
</div>

View File

@ -494,7 +494,7 @@
<strong style="color: #999b2e;"><i class="far fa-fw fa-flag"></i> Reported by:</strong>
<ul style="margin-bottom: 0;">
{% for f in p.flags %}
<li><a href="{{ f.user.url }}">@{{ f.user.username }}</a>: "{{f.reason}}"</li>
<li><a href="{{ f.user.url }}">@{{ f.user.username }}</a>: {{f.reason}}</li>
{% endfor %}
</ul>
</div>
@ -549,7 +549,7 @@
<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-toggle="modal" data-target="#emojiModal" data-toggle="tooltip" data-placement="bottom" title="Add Emoji"><i class="fas fa-smile-beam"></i></div>
</label>
<label class="format btn btn-secondary m-0 ml-1 {% if v and v.dramacoins >= 0 %}d-inline-block{% else %}d-none{% endif %}" for="file-upload-reply-{{p.fullname}}">
<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.base36id}}"><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.base36id}}').innerHTML='image';" hidden>
</label>

View File

@ -333,7 +333,7 @@
<strong style="color: #999b2e;"><i class="far fa-fw fa-flag"></i> Reported by:</strong>
<ul style="margin-bottom: 0;">
{% for f in p.flags %}
<li><a href="{{ f.user.url }}">@{{ f.user.username }}</a>: "{{f.reason}}"</li>
<li><a href="{{ f.user.url }}">@{{ f.user.username }}</a>: {{f.reason}}</li>
{% endfor %}
</ul>
</div>

View File

@ -322,9 +322,6 @@
<small class="form-text text-muted">To post an image, use a direct image link such as i.imgur.com</small>
</div>
<div {% if not v.dramacoins >= 0 %} class="d-none"{% else %} ondrop="event.preventDefault();let input=document.getElementById('file-upload');input.files=event.dataTransfer.files;input.onchange();" ondragover="event.preventDefault();"{% endif %}>
{% if v.dramacoins >= 0 %}
<div id="image-upload-block">
<div><label class="mt-3">Image Upload</label></div>
@ -335,18 +332,6 @@
<small class="form-text text-muted">Images uploaded will be public. Optional if you have text.</small>
</div>
{% else %}
<div id="image-upload-block">
<div><label class="mt-3">Image Upload</label></div>
<label class="btn btn-secondary m-0" for="file-upload">
<div id="filename-show">Select Image</div>
<input id="file-upload" type="file" accept="image/*" hidden disabled>
</label>
<small class="form-text text-muted">You can upload images directly at 1000 Dramacoins.{% if request.headers.get("cf-ipcountry")=="T1" and not v.is_activated %} Additionally, you must have a verified email address to upload images via Tor.{% endif %}</small>
</div>
{% endif %}
</div>
<label for="body" class="mt-3">Text<i class="fas fa-info-circle text-gray-400 ml-1" data-toggle="tooltip" data-placement="top" title="Uses markdown. Limited to 10000 characters."></i></label>
@ -447,9 +432,13 @@
});
</script>
{% if v.dramacoins >= 0 %}
<script>
document.onpaste = function(event) {
var items = (event.clipboardData || event.originalEvent.clipboardData).items;
for (var item in items)
{
if (items[item].kind === "file")
{
f=document.getElementById('file-upload');
f.files = event.clipboardData.files;
$('#filename-show').text(f.files[0].name);
@ -465,6 +454,8 @@
checkForRequired();
break;
}
}
$('#file-upload').on('change', function(e){
@ -481,7 +472,6 @@
checkForRequired();
})
</script>
{% endif %}
</body>

View File

@ -1,3 +1,6 @@
cd D:\1
git pull
sass ./drama/assets/style/dark.scss D:/#D/drama/assets/style/dark_ff66ac.css
sass ./drama/assets/style/light.scss D:/#D/drama/assets/style/light_ff66ac.css
sass ./drama/assets/style/coffee.scss D:/#D/drama/assets/style/coffee_ff66ac.css
@ -7,6 +10,3 @@ python ./compilecss.py
git add .
git commit -m "css"
git push
cd D:\1
git pull