From ef4ab4e83c271e8d33ea1bbde283f6eb163729fb Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Mon, 20 Nov 2017 03:54:29 +0000 Subject: [PATCH] Add logout button to user panel --- webapp/titanembeds/blueprints/user/user.py | 2 ++ webapp/titanembeds/static/css/embedstyle.css | 4 ++++ webapp/titanembeds/templates/embed.html.j2 | 3 +++ 3 files changed, 9 insertions(+) diff --git a/webapp/titanembeds/blueprints/user/user.py b/webapp/titanembeds/blueprints/user/user.py index c134ed3..fb99c9f 100644 --- a/webapp/titanembeds/blueprints/user/user.py +++ b/webapp/titanembeds/blueprints/user/user.py @@ -55,6 +55,8 @@ def callback(): @user.route('/logout', methods=["GET"]) def logout(): redir = session.get("redirect", None) + if not redir: + redir = request.args.get("redirect", None) session.clear() if redir: session['redirect'] = redir diff --git a/webapp/titanembeds/static/css/embedstyle.css b/webapp/titanembeds/static/css/embedstyle.css index 2caa169..3e24d64 100644 --- a/webapp/titanembeds/static/css/embedstyle.css +++ b/webapp/titanembeds/static/css/embedstyle.css @@ -684,6 +684,10 @@ p.mentioned span.chatmessage { width: 302px; } +#logout_btn { + background-color: red; +} + /* CSS Variables */ :root { /*--: */ diff --git a/webapp/titanembeds/templates/embed.html.j2 b/webapp/titanembeds/templates/embed.html.j2 index 3857e0b..d3e3163 100644 --- a/webapp/titanembeds/templates/embed.html.j2 +++ b/webapp/titanembeds/templates/embed.html.j2 @@ -161,6 +161,9 @@ +