mirror of
https://github.com/hrfee/jellyfin-accounts.git
synced 2026-03-04 22:21:11 +00:00
BS4 by default, BS5 optional
Bootstrap 4 w/ jQuery is used by default unless bs5 is enabled in settings/ui. bs4 also now has a jellyfin-style look.
This commit is contained in:
@@ -11,6 +11,7 @@ def page_not_found(e):
|
||||
return (
|
||||
render_template(
|
||||
"404.html",
|
||||
bs5=config.getboolean('ui', 'bs5'),
|
||||
css_file=css_file,
|
||||
contactMessage=config["ui"]["contact_message"],
|
||||
),
|
||||
@@ -23,6 +24,7 @@ def admin():
|
||||
# return app.send_static_file('admin.html')
|
||||
return render_template(
|
||||
"admin.html",
|
||||
bs5=config.getboolean('ui', 'bs5'),
|
||||
css_file=css_file,
|
||||
contactMessage="",
|
||||
email_enabled=config.getboolean("invite_emails", "enabled"),
|
||||
@@ -32,10 +34,18 @@ def admin():
|
||||
@app.route("/<path:path>")
|
||||
def static_proxy(path):
|
||||
if "html" not in path:
|
||||
if "admin.js" in path:
|
||||
if config.getboolean('ui', 'bs5'):
|
||||
bsVersion = 5
|
||||
else:
|
||||
bsVersion = 4
|
||||
return render_template("admin.js",
|
||||
bsVersion=bsVersion)
|
||||
return app.send_static_file(path)
|
||||
return (
|
||||
render_template(
|
||||
"404.html",
|
||||
bs5=config.getboolean('ui', 'bs5'),
|
||||
css_file=css_file,
|
||||
contactMessage=config["ui"]["contact_message"],
|
||||
),
|
||||
@@ -53,6 +63,7 @@ def inviteProxy(path):
|
||||
email = ""
|
||||
return render_template(
|
||||
"form.html",
|
||||
bs5=config.getboolean('ui', 'bs5'),
|
||||
css_file=css_file,
|
||||
contactMessage=config["ui"]["contact_message"],
|
||||
helpMessage=config["ui"]["help_message"],
|
||||
@@ -69,6 +80,7 @@ def inviteProxy(path):
|
||||
log.debug("Attempted use of invalid invite")
|
||||
return render_template(
|
||||
"invalidCode.html",
|
||||
bs5=config.getboolean('ui', 'bs5'),
|
||||
css_file=css_file,
|
||||
contactMessage=config["ui"]["contact_message"],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user