mirror of
https://github.com/discourse/discourse.git
synced 2024-12-20 16:03:42 +08:00
UX: Move revoked API key status to dedicated column (#30125)
* DEV: add table heading for status * UX: Move revoked status to its own column with a badge; remove revoked icon * UX: Increase text contrast for revoked rows
This commit is contained in:
parent
59413e72d4
commit
c817a94c89
|
@ -14,13 +14,13 @@
|
||||||
<th>{{i18n "admin.api.user"}}</th>
|
<th>{{i18n "admin.api.user"}}</th>
|
||||||
<th>{{i18n "admin.api.created"}}</th>
|
<th>{{i18n "admin.api.created"}}</th>
|
||||||
<th>{{i18n "admin.api.last_used"}}</th>
|
<th>{{i18n "admin.api.last_used"}}</th>
|
||||||
|
<th>{{i18n "admin.site_settings.table_column_heading.status"}}</th>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{#each this.model as |k|}}
|
{{#each this.model as |k|}}
|
||||||
<tr class="d-admin-row__content {{if k.revoked_at 'revoked'}}">
|
<tr class="d-admin-row__content {{if k.revoked_at 'revoked'}}">
|
||||||
<td class="d-admin-row__overview key">
|
<td class="d-admin-row__overview key">
|
||||||
{{#if k.revoked_at}}{{d-icon "circle-xmark"}}{{/if}}
|
|
||||||
{{k.truncatedKey}}
|
{{k.truncatedKey}}
|
||||||
</td>
|
</td>
|
||||||
<td class="d-admin-row__detail key-description">
|
<td class="d-admin-row__detail key-description">
|
||||||
|
@ -57,6 +57,20 @@
|
||||||
{{i18n "admin.api.never_used"}}
|
{{i18n "admin.api.never_used"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
|
<td class="d-admin-row__detail">
|
||||||
|
<div class="d-admin-row__mobile-label">{{i18n
|
||||||
|
"admin.site_settings.table_column_heading.status"
|
||||||
|
}}</div>
|
||||||
|
{{#if k.revoked_at}}
|
||||||
|
<div role="status" class="status-label">
|
||||||
|
<div class="status-label-indicator">
|
||||||
|
</div>
|
||||||
|
<div class="status-label-text">
|
||||||
|
{{i18n "admin.api.revoked"}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
</td>
|
||||||
<td class="d-admin-row__controls key-controls">
|
<td class="d-admin-row__controls key-controls">
|
||||||
<DButton
|
<DButton
|
||||||
@action={{route-action "show" k}}
|
@action={{route-action "show" k}}
|
||||||
|
|
|
@ -66,6 +66,33 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.status-label {
|
||||||
|
--d-border-radius: var(--space-4);
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
width: fit-content;
|
||||||
|
background-color: var(--primary-low);
|
||||||
|
padding: var(--space-1) var(--space-2);
|
||||||
|
border-radius: var(--d-border-radius);
|
||||||
|
|
||||||
|
.status-label-indicator {
|
||||||
|
display: inline-block;
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background-color: var(--primary-high);
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-right: var(--space-1);
|
||||||
|
margin-top: 0.4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-label-text {
|
||||||
|
color: var(--primary-high);
|
||||||
|
font-size: var(--font-down-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.d-admin-row__overview {
|
.d-admin-row__overview {
|
||||||
|
|
|
@ -45,15 +45,15 @@ table.web-hooks.grid {
|
||||||
|
|
||||||
// Api keys
|
// Api keys
|
||||||
|
|
||||||
table.api-keys {
|
.d-admin-table.api-keys {
|
||||||
margin-bottom: 0.25em;
|
margin-bottom: 0.25em;
|
||||||
|
|
||||||
tr.revoked {
|
tr.revoked {
|
||||||
color: var(--primary-medium);
|
color: var(--primary-high);
|
||||||
}
|
}
|
||||||
|
|
||||||
.d-admin-row__overview.key {
|
.d-admin-row__overview.key {
|
||||||
width: 30%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7095,6 +7095,8 @@ en:
|
||||||
title: "Upload images"
|
title: "Upload images"
|
||||||
selectable_avatars:
|
selectable_avatars:
|
||||||
title: "List of avatars users can choose from"
|
title: "List of avatars users can choose from"
|
||||||
|
table_column_heading:
|
||||||
|
status: "Status"
|
||||||
categories:
|
categories:
|
||||||
all_results: "All"
|
all_results: "All"
|
||||||
required: "Required"
|
required: "Required"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user