diff --git a/paramecio2/modules/admin/app.py b/paramecio2/modules/admin/app.py index a4755f2..6d422a0 100644 --- a/paramecio2/modules/admin/app.py +++ b/paramecio2/modules/admin/app.py @@ -115,6 +115,7 @@ for app_load in config_admin: @admin_app.route('/admin/') def admin(): + return t.load_template('home.phtml', title=I18n.lang('admin', 'admin', 'Admin')) """ @@ -394,6 +395,17 @@ def auth_check(): return {'error': error, 'you_cannot_login': you_cannot_login} +@admin_app.route('/admin/change_theme/') +def change_theme(): + + theme_selected=str(request.args.get('theme', '0')) + print('Theme '+theme_selected) + session['theme']=theme_selected + + error=0 + + return {'error': error} + """ @admin_app.route('/admin/recovery_password/') def recovery_password(): diff --git a/paramecio2/modules/admin/templates/dashboard.phtml b/paramecio2/modules/admin/templates/dashboard.phtml index 87fc458..cfc1d11 100644 --- a/paramecio2/modules/admin/templates/dashboard.phtml +++ b/paramecio2/modules/admin/templates/dashboard.phtml @@ -1,3 +1,16 @@ +<% + +from flask import session + +dark_checked='' +dark_css='' + +if session.get('theme', '0')=='1': + dark_checked='checked' + dark_css='dark' + + +%>
@@ -20,7 +33,7 @@ ${load_js()|n} <%block name="extra_header"> %block> - +