Some bare minimum of styling the API key page
This commit is contained in:
parent
3adbdeb254
commit
d959a13aa2
2 changed files with 17 additions and 3 deletions
|
@ -307,3 +307,17 @@ form {
|
|||
border-radius: 1em;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.keys ul li {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
span {
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.key-key {
|
||||
max-width: 20em;
|
||||
overflow: clip;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{% extends "base.html.j2" %}
|
||||
{% block content %}
|
||||
<h1>User settings</h1>
|
||||
<div class="">
|
||||
<div class="keys">
|
||||
<h2>API keys</h2>
|
||||
{% with keys = ctx.db.list_keys(ctx.uid) %}
|
||||
<ul>
|
||||
{% for id, name, exp in keys if name != 'web session' %}
|
||||
<li>
|
||||
<span class="key-name">{{ name }}</span>
|
||||
<span class="key-key">{{ id }}</span>
|
||||
<span class="key-name">{{ name or 'anonymous' }}</span>
|
||||
<span class="key-key">{{ id[:10] }}...</span>
|
||||
<span class="key-expiration">{{ 'Expires in' if exp else ''}} {{ exp - datetime.now() if exp else 'Never' }}</span>
|
||||
<form method="post">
|
||||
<input type="hidden" name="action" value="revoke">
|
||||
|
|
Loading…
Reference in a new issue