remotes/1693045480750635534/spooky-22
Aevann1 2022-04-22 22:08:52 +02:00
parent c447af6f50
commit be49ed862f
2 changed files with 9 additions and 2 deletions

View File

@ -289,7 +289,7 @@ def settings_profile_post(v):
theme = request.values.get("theme")
if theme:
if theme in {"dramblr", "classic", "classic_dark", "transparent", "win98", "dark", "light", "coffee", "tron", "4chan", "midnight"}:
if theme in {"dramblr", "reddit", "reddit_dark", "classic", "classic_dark", "transparent", "win98", "dark", "light", "coffee", "tron", "4chan", "midnight"}:
if theme == "transparent" and not v.background:
return {"error": "You need to set a background to use the transparent theme!"}
v.theme = theme

View File

@ -128,7 +128,14 @@
<p>Change the theme for the website.</p>
<div class="input-group mb2">
<select autocomplete="off" id='theme' class="form-control" form="profile-settings" name="theme" onchange="post_toast(this,'/settings/profile?theme='+document.getElementById('theme').value, '1')">
{% for entry in ["dramblr", "classic", "classic_dark", "transparent", "win98", "dark", "light", "coffee", "tron", "4chan", "midnight"] %}
{% if SITE_NAME == 'rDrama' %}
{% set themes = ["dramblr", "classic", "classic_dark", "transparent", "win98", "dark", "light", "coffee", "tron", "4chan", "midnight"] %}
{% else %}
{% set themes = ["dramblr", "reddit", "reddit_dark", "transparent", "win98", "dark", "light", "coffee", "tron", "4chan", "midnight"] %}
{% endif %}
{% for entry in themes %}
<option value="{{entry}}" {% if v.theme==entry %} selected {% endif %}>
{{entry}}
</option>