bvcbc
This commit is contained in:
parent
cf7f5385c1
commit
fbb0fb95d2
7 changed files with 99 additions and 7 deletions
|
@ -164,6 +164,16 @@ ACTIONTYPES={
|
||||||
"icon": "fa-columns",
|
"icon": "fa-columns",
|
||||||
"color": "bg-muted",
|
"color": "bg-muted",
|
||||||
},
|
},
|
||||||
|
"disable_signups": {
|
||||||
|
"str": "disabled signups",
|
||||||
|
"icon": "fa-user-slash",
|
||||||
|
"color": "bg-danger",
|
||||||
|
},
|
||||||
|
"enable_signups": {
|
||||||
|
"str": "enabled signups",
|
||||||
|
"icon": "fa-user",
|
||||||
|
"color": "bg-success",
|
||||||
|
},
|
||||||
"ban_user":{
|
"ban_user":{
|
||||||
"str":'banned user {self.target_link}',
|
"str":'banned user {self.target_link}',
|
||||||
"icon":"fa-user-slash",
|
"icon":"fa-user-slash",
|
||||||
|
|
|
@ -361,7 +361,7 @@ def admin_home(v):
|
||||||
return render_template("CHRISTMAS/admin/admin_home.html", actions=actions, v=v, x=x)
|
return render_template("CHRISTMAS/admin/admin_home.html", actions=actions, v=v, x=x)
|
||||||
|
|
||||||
@app.post("/admin/disablesignups")
|
@app.post("/admin/disablesignups")
|
||||||
@admin_level_required(2)
|
@admin_level_required(3)
|
||||||
@validate_formkey
|
@validate_formkey
|
||||||
def disablesignups(v):
|
def disablesignups(v):
|
||||||
with open('disablesignups', 'r') as f: content = f.read()
|
with open('disablesignups', 'r') as f: content = f.read()
|
||||||
|
@ -369,9 +369,21 @@ def disablesignups(v):
|
||||||
with open('disablesignups', 'w') as f:
|
with open('disablesignups', 'w') as f:
|
||||||
if content == "yes":
|
if content == "yes":
|
||||||
f.write("no")
|
f.write("no")
|
||||||
return {"message": "Signups enabed!"}
|
ma = ModAction(
|
||||||
|
kind="enable_signups",
|
||||||
|
user_id=v.id,
|
||||||
|
)
|
||||||
|
g.db.add(ma)
|
||||||
|
g.db.commit()
|
||||||
|
return {"message": "Signups enabled!"}
|
||||||
else:
|
else:
|
||||||
f.write("yes")
|
f.write("yes")
|
||||||
|
ma = ModAction(
|
||||||
|
kind="disable_signups",
|
||||||
|
user_id=v.id,
|
||||||
|
)
|
||||||
|
g.db.add(ma)
|
||||||
|
g.db.commit()
|
||||||
return {"message": "Signups disabled!"}
|
return {"message": "Signups disabled!"}
|
||||||
|
|
||||||
@app.get("/admin/badge_grant")
|
@app.get("/admin/badge_grant")
|
||||||
|
|
|
@ -22,6 +22,11 @@ def privacy(v):
|
||||||
def emojis(v):
|
def emojis(v):
|
||||||
return render_template("marseys.html", v=v, marseys=marseys.items())
|
return render_template("marseys.html", v=v, marseys=marseys.items())
|
||||||
|
|
||||||
|
@app.get("/terms")
|
||||||
|
@auth_desired
|
||||||
|
def terms(v):
|
||||||
|
return render_template("terms.html", v=v)
|
||||||
|
|
||||||
@app.get('/sidebar')
|
@app.get('/sidebar')
|
||||||
@auth_desired
|
@auth_desired
|
||||||
def sidebar(v):
|
def sidebar(v):
|
||||||
|
|
|
@ -56,9 +56,11 @@
|
||||||
<li><a href="/admin/sidebar">Edit Sidebar</a></li>
|
<li><a href="/admin/sidebar">Edit Sidebar</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="custom-control custom-switch">
|
{% if v.admin_level > 2 %}
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="disablesignups" name="disablesignups" {% if x == "yes" %}checked{% endif %} onchange="post_toast('/admin/disablesignups');">
|
<div class="custom-control custom-switch">
|
||||||
<label class="custom-control-label" for="disablesignups">Disable signups</label>
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="disablesignups" name="disablesignups" {% if x == "yes" %}checked{% endif %} onchange="post_toast('/admin/disablesignups');">
|
||||||
</div>
|
<label class="custom-control-label" for="disablesignups">Disable signups</label>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -88,6 +88,13 @@
|
||||||
|
|
||||||
<button class="btn btn-primary login w-100 mt-3" id="login_button">Sign in</button>
|
<button class="btn btn-primary login w-100 mt-3" id="login_button">Sign in</button>
|
||||||
|
|
||||||
|
|
||||||
|
{% if g.webview %} <div class="custom-control custom-checkbox mt-4">
|
||||||
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="termsCheck" required>
|
||||||
|
<label class="custom-control-label terms" for="termsCheck">I accept the <a
|
||||||
|
href="/terms" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %}>terms of use</a></label>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
<div class="text-center text-muted text-small mt-5 mb-3">
|
<div class="text-center text-muted text-small mt-5 mb-3">
|
||||||
Don't have an account? <a href="/signup{{'?redirect='+redirect if redirect else ''}}" class="font-weight-bold toggle-login">Sign up</a>
|
Don't have an account? <a href="/signup{{'?redirect='+redirect if redirect else ''}}" class="font-weight-bold toggle-login">Sign up</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -112,7 +112,12 @@
|
||||||
<div class="custom-control custom-checkbox mt-4">
|
<div class="custom-control custom-checkbox mt-4">
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="termsCheck" required>
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="termsCheck" required>
|
||||||
<label class="custom-control-label terms" for="termsCheck">I accept the <a
|
<label class="custom-control-label terms" for="termsCheck">I accept the <a
|
||||||
href="/sidebar" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %}>terms and conditions</a></label>
|
{% if g.webview %}
|
||||||
|
href="/terms">terms of use
|
||||||
|
{% else %}
|
||||||
|
href="/sidebar">rules
|
||||||
|
{% endif %}
|
||||||
|
</a></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if hcaptcha %}
|
{% if hcaptcha %}
|
||||||
|
|
51
files/templates/terms.html
Normal file
51
files/templates/terms.html
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
{% extends "default.html" %}
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
<title>{{'SITE_NAME' | app_config}} Terms of use</title>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<pre>
|
||||||
|
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
<div class="mx-4 mt-2 mb-6">
|
||||||
|
<h5 class="text-muted text-uppercase">{{'SITE_NAME'|app_config}} Terms of use</h5>
|
||||||
|
|
||||||
|
<div id="rules" class="my-3">
|
||||||
|
<p>By using Drama you agree to abstain from posting or submitting to any of the following. Additionally, you warrant that anything posted or submitted by you complies with this code of conduct.</p>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h2 class="h3">Legal</h2>
|
||||||
|
|
||||||
|
<p><u>Copyright:</u> You may not post anything copyrighted by another party or material not properly licensed to you.</p>
|
||||||
|
|
||||||
|
<p><u>United States Law:</u> You may not post anything not legal to publish within or export from the United States of America.</p>
|
||||||
|
|
||||||
|
<h2 class="h3" id="safety">Safety</h2>
|
||||||
|
|
||||||
|
<p><u>Harrasment:</u> You may not post anything that harasses or encourages of others either online or offline.</p>
|
||||||
|
|
||||||
|
<p><u>Personal Information:</u> Posting or publishing personal or confidential information is stricly prohibited.</p>
|
||||||
|
|
||||||
|
<p><u>Solicitation:</u> You may not post anything that solicits transactions</p>
|
||||||
|
|
||||||
|
<p><u>Malicious material:</u> Anything that is digitally malicious is strictly prohibited from being posted.</p>
|
||||||
|
|
||||||
|
<p><u>Impersonation:</u> You many not post anything that impersonates other Drama users, moderators, or administrations.</p>
|
||||||
|
|
||||||
|
<p><u>Spam:</u> Spam material is strictly prohibited from being posted on Drama.</p>
|
||||||
|
|
||||||
|
<h2 class="h3" id="sensitive-content">Sexuality</h2>
|
||||||
|
|
||||||
|
<p><u>Pornographic material:</u> You may not post anything that is pornographic in nature. We value Drama as an Internet-based public square. And we qualify pornographic material as indecent exposure in such a setting.</p>
|
||||||
|
|
||||||
|
<p><u>Sexual or sexually suggestive material:</u> Any sexual or sexually suggestive material must be marked "NSFW"</p>
|
||||||
|
|
||||||
|
<p><u>Content involving minors:</u> Drama has zero tolerance for sexual or sexually suggestive material involving minors. Any material that violates this rule will result in a permanent ban.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue