mirror of
https://github.com/hrfee/jellyfin-accounts.git
synced 2026-03-04 22:21:11 +00:00
Cleanup, add theme options
Add theme options to settings to choose between light and dark.
This commit is contained in:
@@ -11,7 +11,7 @@ def page_not_found(e):
|
||||
return (
|
||||
render_template(
|
||||
"404.html",
|
||||
bs5=config.getboolean('ui', 'bs5'),
|
||||
bs5=config.getboolean("ui", "bs5"),
|
||||
css_file=css_file,
|
||||
contactMessage=config["ui"]["contact_message"],
|
||||
),
|
||||
@@ -24,7 +24,7 @@ def admin():
|
||||
# return app.send_static_file('admin.html')
|
||||
return render_template(
|
||||
"admin.html",
|
||||
bs5=config.getboolean('ui', 'bs5'),
|
||||
bs5=config.getboolean("ui", "bs5"),
|
||||
css_file=css_file,
|
||||
contactMessage="",
|
||||
email_enabled=config.getboolean("invite_emails", "enabled"),
|
||||
@@ -35,17 +35,16 @@ def admin():
|
||||
def static_proxy(path):
|
||||
if "html" not in path:
|
||||
if "admin.js" in path:
|
||||
if config.getboolean('ui', 'bs5'):
|
||||
if config.getboolean("ui", "bs5"):
|
||||
bsVersion = 5
|
||||
else:
|
||||
bsVersion = 4
|
||||
return render_template("admin.js",
|
||||
bsVersion=bsVersion)
|
||||
return render_template("admin.js", bsVersion=bsVersion)
|
||||
return app.send_static_file(path)
|
||||
return (
|
||||
render_template(
|
||||
"404.html",
|
||||
bs5=config.getboolean('ui', 'bs5'),
|
||||
bs5=config.getboolean("ui", "bs5"),
|
||||
css_file=css_file,
|
||||
contactMessage=config["ui"]["contact_message"],
|
||||
),
|
||||
@@ -63,7 +62,7 @@ def inviteProxy(path):
|
||||
email = ""
|
||||
return render_template(
|
||||
"form.html",
|
||||
bs5=config.getboolean('ui', 'bs5'),
|
||||
bs5=config.getboolean("ui", "bs5"),
|
||||
css_file=css_file,
|
||||
contactMessage=config["ui"]["contact_message"],
|
||||
helpMessage=config["ui"]["help_message"],
|
||||
@@ -80,7 +79,7 @@ def inviteProxy(path):
|
||||
log.debug("Attempted use of invalid invite")
|
||||
return render_template(
|
||||
"invalidCode.html",
|
||||
bs5=config.getboolean('ui', 'bs5'),
|
||||
bs5=config.getboolean("ui", "bs5"),
|
||||
css_file=css_file,
|
||||
contactMessage=config["ui"]["contact_message"],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user