forked from rDrama/rDrama
fsd
parent
957ed13d5d
commit
c2631b3d71
|
@ -11,7 +11,7 @@ services:
|
||||||
- MASTER_KEY=3435tdfsdudebussylmaoxxt43
|
- MASTER_KEY=3435tdfsdudebussylmaoxxt43
|
||||||
- REDIS_URL=redis://redis
|
- REDIS_URL=redis://redis
|
||||||
- DOMAIN=localhost
|
- DOMAIN=localhost
|
||||||
- SITE_NAME=PCM
|
- SITE_NAME=Drama
|
||||||
- GIPHY_KEY=3435tdfsdudebussylmaoxxt43
|
- GIPHY_KEY=3435tdfsdudebussylmaoxxt43
|
||||||
- DISCORD_SERVER_ID=3435tdfsdudebussylmaoxxt43
|
- DISCORD_SERVER_ID=3435tdfsdudebussylmaoxxt43
|
||||||
- DISCORD_CLIENT_ID=3435tdfsdudebussylmaoxxt43
|
- DISCORD_CLIENT_ID=3435tdfsdudebussylmaoxxt43
|
||||||
|
|
|
@ -303,4 +303,5 @@ def searchusers(v):
|
||||||
next_exists=(len(users)>25)
|
next_exists=(len(users)>25)
|
||||||
users=users[:25]
|
users=users[:25]
|
||||||
|
|
||||||
|
if request.headers.get("Authorization"): return {"data": [x.json for x in users]}
|
||||||
return render_template(f"{template}search_users.html", v=v, query=query, total=total, page=page, users=users, sort=sort, t=t, next_exists=next_exists)
|
return render_template(f"{template}search_users.html", v=v, query=query, total=total, page=page, users=users, sort=sort, t=t, next_exists=next_exists)
|
|
@ -365,11 +365,13 @@ def settings_profile_post(v):
|
||||||
|
|
||||||
theme = request.values.get("theme")
|
theme = request.values.get("theme")
|
||||||
if theme:
|
if theme:
|
||||||
if theme == "transparent" and not v.background:
|
if theme in ["classic","transparent", "win98", "dark", "light", "coffee", "tron", "4chan", "midnight"]:
|
||||||
return render_template(f"{template}settings_profile.html", v=v, error="You need to set a background to use the transparent theme!")
|
if theme == "transparent" and not v.background:
|
||||||
v.theme = theme
|
return render_template(f"{template}settings_profile.html", v=v, error="You need to set a background to use the transparent theme!")
|
||||||
if theme == "win98": v.themecolor = "30409f"
|
v.theme = theme
|
||||||
updated = True
|
if theme == "win98": v.themecolor = "30409f"
|
||||||
|
updated = True
|
||||||
|
else: abort(400)
|
||||||
|
|
||||||
theme2 = request.values.get("theme2")
|
theme2 = request.values.get("theme2")
|
||||||
if theme2:
|
if theme2:
|
||||||
|
@ -640,7 +642,7 @@ def settings_security_post(v):
|
||||||
|
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
||||||
return render_template("settings_security.html", v=v, error="Two-factor authentication enabled.")
|
return render_template("settings_security.html", v=v, msg="Two-factor authentication enabled.")
|
||||||
|
|
||||||
if request.values.get("2fa_remove", ""):
|
if request.values.get("2fa_remove", ""):
|
||||||
|
|
||||||
|
@ -657,7 +659,7 @@ def settings_security_post(v):
|
||||||
|
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
||||||
return render_template("settings_security.html", v=v, error="Two-factor authentication disabled.")
|
return render_template("settings_security.html", v=v, msg="Two-factor authentication disabled.")
|
||||||
|
|
||||||
@app.post("/settings/log_out_all_others")
|
@app.post("/settings/log_out_all_others")
|
||||||
@limiter.limit("1/second")
|
@limiter.limit("1/second")
|
||||||
|
|
|
@ -117,7 +117,7 @@
|
||||||
<a class="dropdown-item" rel="nofollow noopener noreferrer" 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" rel="nofollow noopener noreferrer" href="https://github.com/Aevann1/Drama"><i class="fab fa-github fa-fw text-left mr-3"></i>Source code</a>
|
||||||
|
|
||||||
{% if request.host in ['rdrama.net', 'pcmemes.net'] %}
|
{% if request.host in ['rdrama.net', 'pcmemes.net'] %}
|
||||||
<a class="dropdown-item" rel="nofollow noopener noreferrer" href="/report_bugs"><i class="fas fa-bug fa-fw text-left mr-3"></i>Report bugs or suggestions</a>
|
<a class="dropdown-item" rel="nofollow noopener noreferrer" href="/report_bugs"><i class="fas fa-bug fa-fw text-left mr-3"></i>Bugs/Suggestions</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if request.host != 'pcmemes.net' %}
|
{% if request.host != 'pcmemes.net' %}
|
||||||
|
@ -177,7 +177,7 @@
|
||||||
<a class="nav-item nav-link" rel="nofollow noopener noreferrer" href="https://github.com/Aevann1/Drama"><i class="fab fa-github fa-fw mr-3"></i>Source code</a>
|
<a class="nav-item nav-link" rel="nofollow noopener noreferrer" href="https://github.com/Aevann1/Drama"><i class="fab fa-github fa-fw mr-3"></i>Source code</a>
|
||||||
|
|
||||||
{% if request.host in ['rdrama.net', 'pcmemes.net'] %}
|
{% if request.host in ['rdrama.net', 'pcmemes.net'] %}
|
||||||
<a class="nav-item nav-link" rel="nofollow noopener noreferrer" href="/report_bugs"><i class="fas fa-bug fa-fw mr-3"></i>Report bugs or suggestions</a>
|
<a class="nav-item nav-link" rel="nofollow noopener noreferrer" href="/report_bugs"><i class="fas fa-bug fa-fw mr-3"></i>Bugs/Suggestions</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if request.host != 'pcmemes.net' %}
|
{% if request.host != 'pcmemes.net' %}
|
||||||
|
|
|
@ -111,7 +111,7 @@
|
||||||
<p>Change the theme for the website.</p>
|
<p>Change the theme for the website.</p>
|
||||||
<div class="input-group mb2">
|
<div class="input-group mb2">
|
||||||
<select autocomplete="off" id='theme' class="form-control" form="profile-settings" name="theme" onchange="post_toast('/settings/profile?theme='+document.getElementById('theme').value, '1')">
|
<select autocomplete="off" id='theme' class="form-control" form="profile-settings" name="theme" onchange="post_toast('/settings/profile?theme='+document.getElementById('theme').value, '1')">
|
||||||
{% for entry in ["transparent", "win98", "dark", "light", "coffee", "tron", "4chan", "midnight"] %}
|
{% for entry in ["classic","transparent", "win98", "dark", "light", "coffee", "tron", "4chan", "midnight"] %}
|
||||||
<option value="{{entry}}" {% if v.theme==entry %} selected {% endif %}>
|
<option value="{{entry}}" {% if v.theme==entry %} selected {% endif %}>
|
||||||
{{entry}}
|
{{entry}}
|
||||||
</option>
|
</option>
|
||||||
|
|
|
@ -503,7 +503,7 @@
|
||||||
|
|
||||||
<form action="/admin/title_change/{{u.id}}" method="post">
|
<form action="/admin/title_change/{{u.id}}" method="post">
|
||||||
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
|
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
|
||||||
<input autocomplete="off" id="customtitlebody-mobile" type="text" name="title" class="form-control" placeholder='Enter a flair here' value="{% if u.customtitle %}{{u.customtitle}}{% endif %}">
|
<input autocomplete="off" id="customtitlebody-mobile" 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">
|
||||||
<a class="format" role="button"><i class="btn btn-secondary format d-inline-block m-0 fas fa-smile-beam" onclick="loadEmojis('customtitlebody-mobile')" aria-hidden="true" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Add Emoji"></i></a>
|
<a class="format" role="button"><i class="btn btn-secondary format d-inline-block m-0 fas fa-smile-beam" onclick="loadEmojis('customtitlebody-mobile')" aria-hidden="true" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Add Emoji"></i></a>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue