1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-12-11 02:30:30 +00:00

reader theme

This commit is contained in:
hexeth 2019-01-18 14:28:11 -08:00 committed by GitHub
parent ae55dd6c27
commit 3ba9e4d96e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -682,6 +682,7 @@ def before_request():
g.allow_registration = config.config_public_reg g.allow_registration = config.config_public_reg
g.allow_upload = config.config_uploading g.allow_upload = config.config_uploading
g.current_theme = config.config_theme g.current_theme = config.config_theme
g.current_reader_theme = config.config_reader_theme
g.public_shelfes = ub.session.query(ub.Shelf).filter(ub.Shelf.is_public == 1).order_by(ub.Shelf.name).all() g.public_shelfes = ub.session.query(ub.Shelf).filter(ub.Shelf.is_public == 1).order_by(ub.Shelf.name).all()
if not config.db_configured and request.endpoint not in ('basic_configuration', 'login') and '/static/' not in request.path: if not config.db_configured and request.endpoint not in ('basic_configuration', 'login') and '/static/' not in request.path:
return redirect(url_for('basic_configuration')) return redirect(url_for('basic_configuration'))
@ -2904,7 +2905,9 @@ def view_configuration():
if "config_read_column" in to_save: if "config_read_column" in to_save:
content.config_read_column = int(to_save["config_read_column"]) content.config_read_column = int(to_save["config_read_column"])
if "config_theme" in to_save: if "config_theme" in to_save:
content.config_theme = int(to_save["config_theme"]) content.config_theme = int(to_save["config_reader_theme"])
if "config_reader_theme" in to_save:
content.config_reader_theme = int(to_save["config_reader_theme"])
if "config_title_regex" in to_save: if "config_title_regex" in to_save:
if content.config_title_regex != to_save["config_title_regex"]: if content.config_title_regex != to_save["config_title_regex"]:
content.config_title_regex = to_save["config_title_regex"] content.config_title_regex = to_save["config_title_regex"]