From 50d8e1863e449f5df2a0b51b4b3e1d85551ef2db Mon Sep 17 00:00:00 2001 From: iou1name Date: Sun, 23 Jun 2019 15:03:03 -0400 Subject: [PATCH] added add_key() --- auth.py | 11 +++++++++++ static/juice.css | 13 +++++++++++++ templates/manage.html | 6 ++++++ 3 files changed, 30 insertions(+) diff --git a/auth.py b/auth.py index 6da9c71..30fda68 100644 --- a/auth.py +++ b/auth.py @@ -303,3 +303,14 @@ def delete_token(): return jsonify(ok=True) else: return make_error(404, "token not found") + +@auth_views.route('/add_key') +@auth_required +def add_key(): + """ + Allows a user to add a new security key to their account. + """ + params = { + 'url_prefix': config.url_prefix, + } + return render_template('register_key.html', **params) diff --git a/static/juice.css b/static/juice.css index 3192546..2cd0187 100644 --- a/static/juice.css +++ b/static/juice.css @@ -112,3 +112,16 @@ nav span:hover { .sub-table { margin-top: 5em; } + +.manage-table tfoot td { + border: none; +} + +.add { + color: dimgrey; +} + +.add:hover { + color: red; + cursor: pointer; +} diff --git a/templates/manage.html b/templates/manage.html index 3958f9e..9ee8fe4 100644 --- a/templates/manage.html +++ b/templates/manage.html @@ -26,6 +26,12 @@ {% endfor %} + + + + New key + +

Tokens