From 14f073af864e7d9d94babe2bf094f3079331bb34 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 3 Jul 2023 11:20:34 +0300 Subject: Spruce up UI Make UI somewhat consistent with the GN2 UI. --- gn3/auth/authorisation/users/admin/views.py | 4 ++-- gn3/static/css/styles.css | 16 ++++++++++++++++ gn3/templates/admin/dashboard.html | 4 ++-- gn3/templates/admin/list-oauth2-clients.html | 14 ++++++++------ gn3/templates/admin/login.html | 18 +++++++++--------- gn3/templates/admin/register-client.html | 4 ++-- gn3/templates/admin/registered-client.html | 4 ++-- gn3/templates/admin/view-oauth2-client.html | 4 ++-- gn3/templates/base.html | 9 ++++++++- 9 files changed, 51 insertions(+), 26 deletions(-) create mode 100644 gn3/static/css/styles.css diff --git a/gn3/auth/authorisation/users/admin/views.py b/gn3/auth/authorisation/users/admin/views.py index ca4be5f..c9f1887 100644 --- a/gn3/auth/authorisation/users/admin/views.py +++ b/gn3/auth/authorisation/users/admin/views.py @@ -189,7 +189,7 @@ def edit_client(): the_client = with_db_connection(partial( oauth2_client, client_id=uuid.UUID(form["client_id"]))) if the_client.is_nothing(): - flash("No such client.", "alert-error") + flash("No such client.", "alert-danger") return redirect(url_for("oauth2.admin.list_clients")) the_client = the_client.value client_metadata = { @@ -220,7 +220,7 @@ def delete_client(): the_client = with_db_connection(partial( oauth2_client, client_id=uuid.UUID(form["client_id"]))) if the_client.is_nothing(): - flash("No such client.", "alert-error") + flash("No such client.", "alert-danger") return redirect(url_for("oauth2.admin.list_clients")) the_client = the_client.value with_db_connection(partial(_delete_client, client=the_client)) diff --git a/gn3/static/css/styles.css b/gn3/static/css/styles.css new file mode 100644 index 0000000..692c43d --- /dev/null +++ b/gn3/static/css/styles.css @@ -0,0 +1,16 @@ +h1 { + color: white; + background: #369; + text-align: center; + padding: 0.1em 0 0.1em 0; +} + +.btn { + text-transform: capitalize; +} + +table thead th, table tfoot th { + border-right: 1px solid white; + color: white; + background: #369; +} diff --git a/gn3/templates/admin/dashboard.html b/gn3/templates/admin/dashboard.html index 52fb7d3..7798022 100644 --- a/gn3/templates/admin/dashboard.html +++ b/gn3/templates/admin/dashboard.html @@ -2,11 +2,11 @@ {%block title%}Genenetwork3: Admin Dashboard{%endblock%} +{%block pagetitle%}Admin Dashboard{%endblock%} + {%block content%} {{flash_messages()}} -