From 01df039aab35d070e9c6ba4da93a527592c2d019 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 29 Jun 2016 16:04:00 +0100 Subject: [PATCH] Indicate the type of key in the table of keys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When looking at your keys, it’s useful to know which are `test`/`team`. Default (`normal`) keys don’t get a label. --- app/templates/views/api-keys.html | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/templates/views/api-keys.html b/app/templates/views/api-keys.html index e231928c6..47bbaa1b6 100644 --- a/app/templates/views/api-keys.html +++ b/app/templates/views/api-keys.html @@ -24,11 +24,24 @@ empty_message="You haven’t created any API keys yet", caption="API keys", caption_visible=false, - field_headings=['API keys', hidden_field_heading('Action')], + field_headings=[ + 'API keys', + hidden_field_heading('Key type'), + hidden_field_heading('Action') + ], ) %} {% call field() %} {{ item.name }} {% endcall %} + {% call field(status='default') %} + {% if item.key_type == 'normal' %} + Normal + {% elif item.key_type == 'team' %} + Only sends to team members + {% elif item.key_type == 'test' %} + Simulates sending messages + {% endif %} + {% endcall %} {% if item.expiry_date %} {% call field(align='right', status='default') %} Revoked {{ item.expiry_date|format_datetime }}