rename some retarded ruqqus terminology

remotes/1693045480750635534/spooky-22
Aevann1 2022-08-11 06:04:41 +02:00
parent 57cc579b30
commit cfa17aaf68
5 changed files with 21 additions and 21 deletions

View File

@ -1,5 +1,5 @@
function removeComment(post_id,button1,button2) {
url="/ban_comment/"+post_id
url="/remove_comment/"+post_id
post(url)
@ -20,7 +20,7 @@ function removeComment(post_id,button1,button2) {
};
function approveComment(post_id,button1,button2) {
url="/unban_comment/"+post_id
url="/approve_comment/"+post_id
post(url)
@ -42,7 +42,7 @@ function approveComment(post_id,button1,button2) {
function removeComment2(post_id,button1,button2) {
url="/ban_comment/"+post_id
url="/remove_comment/"+post_id
post(url)
@ -58,7 +58,7 @@ function removeComment2(post_id,button1,button2) {
};
function approveComment2(post_id,button1,button2) {
url="/unban_comment/"+post_id
url="/approve_comment/"+post_id
post(url)

View File

@ -1086,10 +1086,10 @@ def unban_user(user_id, v):
else: return {"message": f"@{user.username} was unbanned!"}
@app.post("/ban_post/<post_id>")
@app.post("/remove_post/<post_id>")
@limiter.limit("1/second;30/minute;200/hour;1000/day")
@admin_level_required(2)
def ban_post(post_id, v):
def remove_post(post_id, v):
post = get_post(post_id)
@ -1123,10 +1123,10 @@ def ban_post(post_id, v):
return {"message": "Post removed!"}
@app.post("/unban_post/<post_id>")
@app.post("/approve_post/<post_id>")
@limiter.limit("1/second;30/minute;200/hour;1000/day")
@admin_level_required(2)
def unban_post(post_id, v):
def approve_post(post_id, v):
post = get_post(post_id)
@ -1294,10 +1294,10 @@ def unsticky_comment(cid, v):
return {"message": "Comment unpinned!"}
@app.post("/ban_comment/<c_id>")
@app.post("/remove_comment/<c_id>")
@limiter.limit("1/second;30/minute;200/hour;1000/day")
@admin_level_required(2)
def api_ban_comment(c_id, v):
def api_remove_comment(c_id, v):
comment = get_comment(c_id)
if not comment:
@ -1317,10 +1317,10 @@ def api_ban_comment(c_id, v):
return {"message": "Comment removed!"}
@app.post("/unban_comment/<c_id>")
@app.post("/approve_comment/<c_id>")
@limiter.limit("1/second;30/minute;200/hour;1000/day")
@admin_level_required(2)
def api_unban_comment(c_id, v):
def api_approve_comment(c_id, v):
comment = get_comment(c_id)
if not comment: abort(404)

View File

@ -870,7 +870,7 @@
<script src="/assets/js/clipboard.js?v=250"></script>
{% if v and v.admin_level > 1 %}
<script src="/assets/js/comments_admin.js?v=251"></script>
<script src="/assets/js/comments_admin.js?v=252"></script>
{% endif %}
{% include "expanded_image_modal.html" %}

View File

@ -62,11 +62,11 @@
{% if v.admin_level > 1 %}
{% if "/reported/" in request.path %}
{% if v.id != p.author.id %}<a class="dropdown-item list-inline-item text-danger" role="button" onclick="post_toast(this,'/ban_post/{{p.id}}')"><i class="fas fa-ban"></i>Remove</a>{% endif %}
<a class="dropdown-item list-inline-item text-success" role="button" onclick="post_toast(this,'/unban_post/{{p.id}}')"><i class="fas fa-check"></i>Approve</a>
{% if v.id != p.author.id %}<a class="dropdown-item list-inline-item text-danger" role="button" onclick="post_toast(this,'/remove_post/{{p.id}}')"><i class="fas fa-ban"></i>Remove</a>{% endif %}
<a class="dropdown-item list-inline-item text-success" role="button" onclick="post_toast(this,'/approve_post/{{p.id}}')"><i class="fas fa-check"></i>Approve</a>
{% else %}
{% if v.id != p.author.id %}<a id="remove-{{p.id}}" class="dropdown-item {% if p.is_banned %}d-none{% endif %} list-inline-item text-danger" role="button" onclick="post_toast(this,'/ban_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}','d-none')"><i class="fas fa-ban"></i>Remove</a>{% endif %}
<a id="approve-{{p.id}}" class="dropdown-item {% if not p.is_banned %}d-none{% endif %} list-inline-item text-success" role="button" onclick="post_toast(this,'/unban_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}','d-none')"><i class="fas fa-check"></i>Approve</a>
{% if v.id != p.author.id %}<a id="remove-{{p.id}}" class="dropdown-item {% if p.is_banned %}d-none{% endif %} list-inline-item text-danger" role="button" onclick="post_toast(this,'/remove_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}','d-none')"><i class="fas fa-ban"></i>Remove</a>{% endif %}
<a id="approve-{{p.id}}" class="dropdown-item {% if not p.is_banned %}d-none{% endif %} list-inline-item text-success" role="button" onclick="post_toast(this,'/approve_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}','d-none')"><i class="fas fa-check"></i>Approve</a>
{% endif %}
{% if p.oauth_app %}

View File

@ -27,11 +27,11 @@
<button id="unpin2-{{p.id}}" class="{% if not p.stickied %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-primary" role="button" onclick="post_toast(this,'/unsticky/{{p.id}}','pin2-{{p.id}}','unpin2-{{p.id}}','d-none')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center text-primary mr-3"></i>Unpin</button>
{% if "/reported/" in request.path %}
<button class="nobackground btn btn-link btn-block btn-lg text-danger text-left" role="button" onclick="post_toast(this,'/ban_post/{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-ban text-center mr-3"></i>Remove</button>
<button class="nobackground btn btn-link btn-block btn-lg text-success text-left" role="button" onclick="post_toast(this,'/unban_post/{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-check text-center mr-3"></i>Approve</button>
<button class="nobackground btn btn-link btn-block btn-lg text-danger text-left" role="button" onclick="post_toast(this,'/remove_post/{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-ban text-center mr-3"></i>Remove</button>
<button class="nobackground btn btn-link btn-block btn-lg text-success text-left" role="button" onclick="post_toast(this,'/approve_post/{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-check text-center mr-3"></i>Approve</button>
{% else %}
<button id="remove2-{{p.id}}" class="{% if p.is_banned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-danger text-left" role="button" onclick="post_toast(this,'/ban_post/{{p.id}}','remove2-{{p.id}}','approve2-{{p.id}}','d-none')" data-bs-dismiss="modal"><i class="far fa-ban text-center mr-3"></i>Remove</button>
<button id="approve2-{{p.id}}" class="{% if not p.is_banned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-success text-left" role="button" onclick="post_toast(this,'/unban_post/{{p.id}}','remove2-{{p.id}}','approve2-{{p.id}}','d-none')" data-bs-dismiss="modal"><i class="far fa-check text-center mr-3"></i>Approve</button>
<button id="remove2-{{p.id}}" class="{% if p.is_banned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-danger text-left" role="button" onclick="post_toast(this,'/remove_post/{{p.id}}','remove2-{{p.id}}','approve2-{{p.id}}','d-none')" data-bs-dismiss="modal"><i class="far fa-ban text-center mr-3"></i>Remove</button>
<button id="approve2-{{p.id}}" class="{% if not p.is_banned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-success text-left" role="button" onclick="post_toast(this,'/approve_post/{{p.id}}','remove2-{{p.id}}','approve2-{{p.id}}','d-none')" data-bs-dismiss="modal"><i class="far fa-check text-center mr-3"></i>Approve</button>
{% endif %}
{% if p.oauth_app %}