Merge branch 'mistletoe' into snow
This commit is contained in:
commit
f9a0d7c990
12 changed files with 65 additions and 67 deletions
|
@ -130,7 +130,7 @@ if SITE == 'rdrama.net':
|
|||
DONGER_ID = 541
|
||||
FARTBINN_ID = 2256
|
||||
BUG_THREAD = 18459
|
||||
EMOJI_THREAD = 22479
|
||||
EMOJI_THREAD = 16583
|
||||
elif SITE == "pcmemes.net":
|
||||
BASEDBOT_ID = 800
|
||||
KIPPY_ID = 1592
|
||||
|
|
|
@ -91,7 +91,9 @@ def api_vote_post(post_id, new, v):
|
|||
existing.vote_type = new
|
||||
g.db.add(existing)
|
||||
elif existing.vote_type != 0 and new == 0:
|
||||
post.author.coins -= 2
|
||||
if post.created_utc > 1639302300: post.author.coins -= 2
|
||||
else: post.author.coins -= 1
|
||||
post.author.coins -= amount
|
||||
post.author.truecoins -= 1
|
||||
g.db.add(post.author)
|
||||
g.db.delete(existing)
|
||||
|
@ -159,7 +161,8 @@ def api_vote_comment(comment_id, new, v):
|
|||
existing.vote_type = new
|
||||
g.db.add(existing)
|
||||
elif existing.vote_type != 0 and new == 0:
|
||||
comment.author.coins -= 2
|
||||
if comment.created_utc > 1639302300: comment.author.coins -= 2
|
||||
else: comment.author.coins -= 1
|
||||
comment.author.truecoins -= 1
|
||||
g.db.add(comment.author)
|
||||
g.db.delete(existing)
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-span-full my-4">
|
||||
<pre>
|
||||
|
||||
|
||||
|
@ -27,7 +28,7 @@
|
|||
|
||||
|
||||
|
||||
<table class="table table-striped mb-5">
|
||||
<table class="w-full table table-striped mb-5">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th></th>
|
||||
|
@ -84,5 +85,5 @@
|
|||
|
||||
{% endif %}
|
||||
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -6,10 +6,7 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col col-lg-8">
|
||||
<div class="settings">
|
||||
<div class="col-span-full my-4">
|
||||
|
||||
<div class="settings-section rounded">
|
||||
<div class="d-lg-flex">
|
||||
|
@ -45,15 +42,12 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% if listing %}
|
||||
{% include "submission_listing.html" %}
|
||||
{% elif comments %}
|
||||
{% include "comments.html" %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="toast" id="toast-post-success" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
||||
|
|
|
@ -6,54 +6,50 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-span-full my-4">
|
||||
{% for app in apps %}
|
||||
<div class="flex flex-col space-y-4">
|
||||
<div class="d-lg-flex">
|
||||
<div class="text-lg mb-2 learding-normal">
|
||||
<label for="over18">
|
||||
<a href="{{app.permalink}}" {% if v and v.newtab %}target="_blank"{% endif %}>{{app.app_name}}</a>
|
||||
</label>
|
||||
</div>
|
||||
<div class="flex flex-col space-y-2">
|
||||
<label for="edit-{{app.id}}-author" class="label">User</label>
|
||||
<input id="edit-{{app.id}}-author" class="form-input" type="text" name="name" value="{{app.author.username}}" readonly=readonly>
|
||||
|
||||
<div class="row">
|
||||
<div class="col col-lg-8">
|
||||
<div class="settings">
|
||||
{% for app in apps %}
|
||||
<div class="settings-section rounded">
|
||||
<div class="d-lg-flex">
|
||||
<div class="title w-lg-25">
|
||||
<label for="over18"><a href="{{app.permalink}}" {% if v and v.newtab %}target="_blank"{% endif %}>{{app.app_name}}</a></label>
|
||||
</div>
|
||||
<div class="body w-lg-100">
|
||||
<label for="edit-{{app.id}}-author" class="mb-0 w-lg-25">User</label>
|
||||
<input id="edit-{{app.id}}-author" class="form-control" type="text" name="name" value="{{app.author.username}}" readonly=readonly>
|
||||
<label for="edit-{{app.id}}-name" class="label">App Name</label>
|
||||
<input id="edit-{{app.id}}-name" class="form-input" type="text" name="name" value="{{app.app_name}}" readonly=readonly>
|
||||
|
||||
<label for="edit-{{app.id}}-name" class="mb-0 w-lg-25">App Name</label>
|
||||
<input id="edit-{{app.id}}-name" class="form-control" type="text" name="name" value="{{app.app_name}}" readonly=readonly>
|
||||
|
||||
{% if app.client_id %}
|
||||
<label for="edit-{{app.id}}-client-id" class="mb-0 w-lg-25">Client ID</label>
|
||||
<input id="edit-{{app.id}}-client-id" class="form-control" type="text" name="name" value="{{app.client_id}}" readonly="readonly">
|
||||
{% endif %}
|
||||
{% if app.client_id %}
|
||||
<label for="edit-{{app.id}}-client-id" class="label">Client ID</label>
|
||||
<input id="edit-{{app.id}}-client-id" class="form-input" type="text" name="name" value="{{app.client_id}}" readonly="readonly">
|
||||
{% endif %}
|
||||
|
||||
|
||||
<label for="edit-{{app.id}}-redirect" class="mb-0 w-lg-25">Redirect URI</label>
|
||||
<input id="edit-{{app.id}}-redirect" class="form-control" type="text" name="redirect_uri" value="{{app.redirect_uri}}" readonly="readonly">
|
||||
<label for="edit-{{app.id}}-desc" class="mb-0 w-lg-25">Description</label>
|
||||
<textarea form="edit-app-{{app.id}}" class="form-control" name="description" id="edit-{{app.id}}-desc" maxlength="256" readonly="readonly">{{app.description}}</textarea>
|
||||
<label for="edit-{{app.id}}-redirect" class="label">Redirect URI</label>
|
||||
<input id="edit-{{app.id}}-redirect" class="form-input" type="text" name="redirect_uri" value="{{app.redirect_uri}}" readonly="readonly">
|
||||
<label for="edit-{{app.id}}-desc" class="label">Description</label>
|
||||
<textarea form="edit-app-{{app.id}}" class="form-input" name="description" id="edit-{{app.id}}-desc" maxlength="256" readonly="readonly">{{app.description}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<div class="flex">
|
||||
{% if not app.client_id %}
|
||||
|
||||
<a href="javascript:void(0)" class="btn btn-green ml-auto" onclick="post_toast('/admin/app/approve/{{app.id}}')">Approve</a>
|
||||
<a href="javascript:void(0)" class="btn btn-red" onclick="post_toast('/admin/app/reject/{{app.id}}')">Reject</a>
|
||||
|
||||
{% else %}
|
||||
|
||||
<a href="javascript:void(0)" class="btn btn-red ml-auto" onclick="post_toast('/admin/app/revoke/{{app.id}}')">Revoke</a>
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="d-flex">
|
||||
{% if not app.client_id %}
|
||||
|
||||
<a href="javascript:void(0)" class="btn btn-primary ml-auto" onclick="post_toast('/admin/app/approve/{{app.id}}')">Approve</a>
|
||||
<a href="javascript:void(0)" class="btn btn-secondary mr-0" onclick="post_toast('/admin/app/reject/{{app.id}}')">Reject</a>
|
||||
|
||||
{% else %}
|
||||
|
||||
<a href="javascript:void(0)" class="btn btn-primary ml-auto" onclick="post_toast('/admin/app/revoke/{{app.id}}')">Revoke</a>
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="toast" id="toast-post-success" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
{% block content %}
|
||||
|
||||
<div class="col-span-full">
|
||||
<div class="col-span-full my-4">
|
||||
|
||||
{% if error %}
|
||||
<div class="alert alert-danger alert-dismissible fade show my-3" role="alert">
|
||||
|
@ -40,9 +40,9 @@
|
|||
<form action="/admin/awards", method="post">
|
||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
<label for="input-username">Username</label><br>
|
||||
<input id="input-username" class="form-control mb-3" type="text" name="username" required>
|
||||
<input id="input-username" class="form-input mb-3" type="text" name="username" required>
|
||||
|
||||
<table class="table table-striped">
|
||||
<table class="w-full table table-striped">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th scope="col">Icon</th>
|
||||
|
@ -55,18 +55,18 @@
|
|||
<tr>
|
||||
<td><i class="{{a['icon']}} {{a['color']}}" style="font-size: 30px"></i></td>
|
||||
<td style="font-weight: bold">{{a['title']}}</td>
|
||||
<td><input type="number" class="form-control" name="{{a['kind']}}" value="0" min="0" max="10" placeholder="Enter amount..." ></td>
|
||||
<td><input type="number" class="form-input" name="{{a['kind']}}" value="0" min="0" max="10" placeholder="Enter amount..." ></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
<input class="btn btn-primary mt-3" type="submit" value="Grant Awards">
|
||||
<input class="btn btn-green mt-3" type="submit" value="Grant Awards">
|
||||
|
||||
</form>
|
||||
|
||||
<pre></pre>
|
||||
{% if 'rdrama.net' not in request.host or v.admin_level > 2 %}
|
||||
<div><a class="btn btn-success" href="javascript:void(0)" onclick="post_toast('/admin/monthly')">Grant Monthly Marseybux</a></div>
|
||||
<div><a class="btn btn-green mt-3" href="javascript:void(0)" onclick="post_toast('/admin/monthly')">Grant Monthly Marseybux</a></div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
|
|
@ -324,7 +324,7 @@
|
|||
<div id="comment-banned-warning" class="hidden-on-collapse text-red-600 mb-0">Removed by @{{c.ban_reason}}</div>
|
||||
{% endif %}
|
||||
|
||||
<div id="comment-text-{{c.id}}" class="hidden-on-collapse text-black mt-2 {% if c.award_count("candycane") %}candycane{% endif %}">
|
||||
<div id="comment-text-{{c.id}}" class="hidden-on-collapse text-black mt-2 break-words {% if c.award_count("candycane") %}candycane{% endif %}">
|
||||
{{c.realbody(v) | safe}}
|
||||
{% if c.options %}
|
||||
{% for o in c.options %}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<span class="font-bold text-gray-200">55</span>
|
||||
</div>
|
||||
<div class="pl-3 mt-[-1px]">
|
||||
<a href="https://rdrama.net/post/22479/megathread-posts-here-marseys-or-other" class="block font-bold text-gray-100">
|
||||
<a href="/post/16583/" class="block font-bold text-gray-100">
|
||||
[MEGATHREAD] posts here marseys (or other emojis) u want added
|
||||
</a>
|
||||
<small class="block text-gray-400">
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</div>
|
||||
<div class="relative modal-body">
|
||||
<!-- If user has less than 100 dramacoin, disable form -->
|
||||
{% if u.coins < 100 %}
|
||||
{% if v.coins < 100 %}
|
||||
<div class="absolute left-0 bottom-0 flex flex-col items-center justify-center w-full h-full bg-white/60 z-10">
|
||||
<p class="text-lg font-bold text-gray-900 mb-0">
|
||||
You need at least 100 dramacoin to send coins.
|
||||
|
@ -53,7 +53,7 @@
|
|||
<button type="button" class="px-4 py-2 text-sm font-bold text-gray-500 hover:text-gray-700" data-bs-dismiss="modal">
|
||||
Cancel
|
||||
</button>
|
||||
<button onclick="transferCoins()" class="btn btn-green {{ 'cursor-not-allowed' if u.coins < 100 }}" {% if u.coins < 100 %}disabled{% endif %}>
|
||||
<button onclick="transferCoins()" class="btn btn-green {{ 'cursor-not-allowed' if v.coins < 100 }}" {% if v.coins < 100 %}disabled{% endif %}>
|
||||
Gift coins
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
<div class="settings">
|
||||
|
||||
{% if v.grinch %}
|
||||
|
||||
<h2 class="label text-black">Grinch Mode</h2>
|
||||
|
||||
<div class="body w-lg-100">
|
||||
|
@ -23,6 +25,8 @@
|
|||
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
<h2 class="label text-black">Highlight New Comments</h2>
|
||||
|
||||
<div class="body w-lg-100">
|
||||
|
|
|
@ -232,7 +232,7 @@
|
|||
</h5>
|
||||
|
||||
{% if p.realbody(v) and not p.over_18 %}
|
||||
<div class="relative z-10 gradient-mask max-h-12 mb-2 overflow-hidden pointer-events-none text-gray-600" id="post-text-{{p.id}}">
|
||||
<div class="relative z-10 gradient-mask max-h-12 mb-2 overflow-hidden pointer-events-none text-gray-600 break-words" style="word-break: break-word;" id="post-text-{{p.id}}">
|
||||
{{p.realbody(v) | safe}}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
4
setup
4
setup
|
@ -11,8 +11,8 @@ sudo apt -y install python3-pip
|
|||
sudo pip3 install -r requirements.txt
|
||||
sudo apt -y install gunicorn
|
||||
sudo apt -y install ffmpeg
|
||||
mkdir /drama/songs
|
||||
mkdir /drama/images
|
||||
mkdir /songs
|
||||
mkdir /images
|
||||
cp ./env /env
|
||||
. /env
|
||||
gunicorn files.__main__:app -k gevent -w 2 --reload -b localhost:80 --max-requests 1000 --max-requests-jitter 500
|
Loading…
Add table
Add a link
Reference in a new issue