From 0627b7203133cf249c2e928572ed2b78e5e13cdc Mon Sep 17 00:00:00 2001 From: Reid 'arrdem' McKenzie Date: Sat, 27 May 2023 00:45:34 -0600 Subject: [PATCH] Some bare minimum of styling the API key page --- .../src/python/tentacles/static/css/style.scss | 14 ++++++++++++++ .../src/python/tentacles/templates/user.html.j2 | 6 +++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/projects/tentacles/src/python/tentacles/static/css/style.scss b/projects/tentacles/src/python/tentacles/static/css/style.scss index 4b3bb49..23db6f5 100644 --- a/projects/tentacles/src/python/tentacles/static/css/style.scss +++ b/projects/tentacles/src/python/tentacles/static/css/style.scss @@ -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; + } +} diff --git a/projects/tentacles/src/python/tentacles/templates/user.html.j2 b/projects/tentacles/src/python/tentacles/templates/user.html.j2 index a70290b..fdd9ca0 100644 --- a/projects/tentacles/src/python/tentacles/templates/user.html.j2 +++ b/projects/tentacles/src/python/tentacles/templates/user.html.j2 @@ -1,14 +1,14 @@ {% extends "base.html.j2" %} {% block content %}

User settings

-
+

API keys

{% with keys = ctx.db.list_keys(ctx.uid) %}
    {% for id, name, exp in keys if name != 'web session' %}
  • - {{ name }} - {{ id }} + {{ name or 'anonymous' }} + {{ id[:10] }}... {{ 'Expires in' if exp else ''}} {{ exp - datetime.now() if exp else 'Never' }}