From facc05800b33deede35e1e6c033a5ff7cb96db3e Mon Sep 17 00:00:00 2001 From: Silversthorn Date: Sun, 28 Jul 2024 19:27:52 +0200 Subject: [PATCH] Fixing API Keys --- app/frontend/static/assets/css/crafty.css | 18 ++++++++++- .../panel/panel_edit_user_apikeys.html | 31 ++++++------------- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/app/frontend/static/assets/css/crafty.css b/app/frontend/static/assets/css/crafty.css index 2e3fe1ba..15614de1 100644 --- a/app/frontend/static/assets/css/crafty.css +++ b/app/frontend/static/assets/css/crafty.css @@ -366,6 +366,20 @@ noscript.noscript-warning { color: var(--purple); } +/**************************************************************/ + +/**************************************************************/ +/* CSS for API Keys Displays */ +/**************************************************************/ + +.api-key { + white-space: pre-wrap; + color: white; + word-break: break-all; + background: grey; + border-radius: 5px; +} + /**************************************************************/ div.form-group.reset-secret { background: rgba(243, 21, 6, 0.3); @@ -379,4 +393,6 @@ div.form-group.reset-secret { .hidden-input { margin-left: -40px; -} \ No newline at end of file +} + +/**************************************************************/ \ No newline at end of file diff --git a/app/frontend/templates/panel/panel_edit_user_apikeys.html b/app/frontend/templates/panel/panel_edit_user_apikeys.html index 76fa780b..fac100f1 100644 --- a/app/frontend/templates/panel/panel_edit_user_apikeys.html +++ b/app/frontend/templates/panel/panel_edit_user_apikeys.html @@ -31,13 +31,11 @@
@@ -86,13 +84,9 @@ apikey.server_permissions }} {{ translate('apiKeys', 'crafty', data['lang']) }} {{ apikey.crafty_permissions }} - - @@ -118,8 +112,7 @@ - +
@@ -136,9 +129,7 @@ }} {% end %} @@ -149,13 +140,9 @@ @@ -306,7 +293,7 @@ if (responseData.status === "ok") { bootbox.alert({ title: `API token for ${keyName}`, - message: `Here is an API token for ${keyName}:\n
${responseData.data}
` + message: `Here is an API token for ${keyName}:\n
${responseData.data}
` }); } else {
- +
{% if permission in data['user_crafty_permissions'] %} - + {% else %} - + {% end %}