Added options for change theme

This commit is contained in:
absurdo 2023-11-26 21:25:16 +01:00
parent 12ea2a085a
commit 6f6ede7cc7
3 changed files with 14 additions and 4 deletions

View file

@ -252,7 +252,11 @@ def login():
sendmail.send(config.portal_email, [arr_user['email']], I18n.lang('admin', 'code_for_complete_login', 'Code for complete login'), I18n.lang('admin', 'code_for_complete_login_explain', 'We send to you a code for activate your account using double authentication:')+"\n"+token_auth, content_type='plain', attachments=[])
if arr_user['dark_theme']:
session['theme']='1'
else:
session['theme']='0'
arr_update['last_login']=now()
if len(arr_update)>0:
@ -399,7 +403,7 @@ def auth_check():
def change_theme():
theme_selected=str(request.args.get('theme', '0'))
print('Theme '+theme_selected)
session['theme']=theme_selected
error=0