added add_key()
This commit is contained in:
parent
b15e0be464
commit
50d8e1863e
11
auth.py
11
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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -26,6 +26,12 @@
|
|||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td><span title="Add a new security key" class="add font-awesome" onclick="window.location=url_prefix+'/add_key'"></span></td>
|
||||
<td>New key</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<h2 class="sub-table">Tokens</h2>
|
||||
<table id="tokens" class="manage-table">
|
||||
|
|
Loading…
Reference in New Issue
Block a user