forked from MarseyWorld/MarseyWorld
make 3 more buttons instant
parent
6c1c79ba44
commit
3b49535c4a
|
@ -924,7 +924,7 @@ def admin_title_change(user_id, v):
|
||||||
)
|
)
|
||||||
g.db.add(ma)
|
g.db.add(ma)
|
||||||
|
|
||||||
return redirect(user.url)
|
return {"message": f"@{user.username}'s flair has been changed!"}
|
||||||
|
|
||||||
@app.post("/ban_user/<user_id>")
|
@app.post("/ban_user/<user_id>")
|
||||||
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
||||||
|
@ -1480,7 +1480,7 @@ def admin_nuke_user(v):
|
||||||
)
|
)
|
||||||
g.db.add(ma)
|
g.db.add(ma)
|
||||||
|
|
||||||
return redirect(user.url)
|
return {"message": f"@{user.username}'s content has been removed!"}
|
||||||
|
|
||||||
|
|
||||||
@app.post("/admin/unnuke_user")
|
@app.post("/admin/unnuke_user")
|
||||||
|
@ -1515,4 +1515,4 @@ def admin_nunuke_user(v):
|
||||||
)
|
)
|
||||||
g.db.add(ma)
|
g.db.add(ma)
|
||||||
|
|
||||||
return redirect(user.url)
|
return {"message": f"@{user.username}'s content has been approved!"}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
{% if v.admin_level >= PERMS['USER_TITLE_CHANGE'] %}
|
{% if v.admin_level >= PERMS['USER_TITLE_CHANGE'] %}
|
||||||
<div class="body d-lg-flex border-bottom mb-2">
|
<div class="body d-lg-flex border-bottom mb-2">
|
||||||
<div class="w-lg-100">
|
<div class="w-lg-100">
|
||||||
<form action="/admin/title_change/{{u.id}}" method="post">
|
<form action="/admin/title_change/{{u.id}}" method="post" onsubmit="sendFormXHR(event)">
|
||||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||||
<input maxlength=100 autocomplete="off" id="customtitlebody-{{deviceType}}" type="text" name="title" class="form-control" placeholder='Enter a flair here' value="{% if u.customtitleplain %}{{u.customtitleplain}}{% endif %}">
|
<input maxlength=100 autocomplete="off" id="customtitlebody-{{deviceType}}" type="text" name="title" class="form-control" placeholder='Enter a flair here' value="{% if u.customtitleplain %}{{u.customtitleplain}}{% endif %}">
|
||||||
<div class="d-flex mt-2">
|
<div class="d-flex mt-2">
|
||||||
|
@ -96,12 +96,12 @@
|
||||||
<button type="button" id="unmute-user-{{deviceType}}" class="mb-1 {% if not u.is_muted %}d-none{% endif %} btn btn-success" onclick="postToastSwitch(this,'/mute_user/{{u.id}}/0','mute-user-{{deviceType}}','unmute-user-{{deviceType}}','d-none')">Unmute</button>
|
<button type="button" id="unmute-user-{{deviceType}}" class="mb-1 {% if not u.is_muted %}d-none{% endif %} btn btn-success" onclick="postToastSwitch(this,'/mute_user/{{u.id}}/0','mute-user-{{deviceType}}','unmute-user-{{deviceType}}','d-none')">Unmute</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
|
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
|
||||||
<form action="/admin/unnuke_user" method="post">
|
<form action="/admin/unnuke_user" method="post" onsubmit="sendFormXHR(event)">
|
||||||
<input type="hidden" name="formkey", value="{{v.formkey}}">
|
<input type="hidden" name="formkey", value="{{v.formkey}}">
|
||||||
<input type="hidden" name="user" value="{{u.username}}">
|
<input type="hidden" name="user" value="{{u.username}}">
|
||||||
<input type="submit" onclick="disable(this)" class="btn btn-success" value="Approve User's Content">
|
<input type="submit" onclick="disable(this)" class="btn btn-success" value="Approve User's Content">
|
||||||
</form>
|
</form>
|
||||||
<form class="mt-1" action="/admin/nuke_user" method="post">
|
<form class="mt-1" action="/admin/nuke_user" method="post" onsubmit="sendFormXHR(event)">
|
||||||
<input type="hidden" name="formkey", value="{{v.formkey}}">
|
<input type="hidden" name="formkey", value="{{v.formkey}}">
|
||||||
<input type="hidden" name="user" value="{{u.username}}">
|
<input type="hidden" name="user" value="{{u.username}}">
|
||||||
<input type="submit" onclick="disable(this)" class="btn btn-danger" value="Remove User's Content">
|
<input type="submit" onclick="disable(this)" class="btn btn-danger" value="Remove User's Content">
|
||||||
|
|
Loading…
Reference in New Issue