tokens: remove expiresAt and add lastUsed

This commit is contained in:
Girish Ramakrishnan
2021-03-15 12:44:24 -07:00
parent 515d93f5ef
commit b18f42b372
9 changed files with 115 additions and 55 deletions

View File

@@ -430,7 +430,7 @@
<thead>
<tr>
<th style="width: 45%">{{ 'profile.apiTokens.name' | tr }}</th>
<th style="width: 45%">{{ 'profile.apiTokens.expiresAt' | tr }}</th>
<th style="width: 45%">{{ 'profile.apiTokens.lastUsed' | tr }}</th>
<th style="width: 10%" class="text-right">{{ 'main.actions' | tr }}</th>
</tr>
</thead>
@@ -443,7 +443,8 @@
{{ token.name || 'unnamed' }}
</td>
<td class="elide-table-cell" style="text-overflow: ellipsis; white-space: nowrap;">
{{ token.expires | prettyShortDate }}
<span ng-show="token.lastUsedTime">{{ token.lastUsedTime | prettyLongDate }}</span>
<span ng-show="!token.lastUsedTime">{{ 'profile.apiTokens.neverUsed' | tr }}</span>
</td>
<td class="text-right no-wrap" style="vertical-align: bottom">
<button class="btn btn-xs btn-danger" ng-click="tokens.revokeToken(token)" uib-tooltip="{{ 'profile.apiTokens.revokeTokenTooltip' | tr }}"><i class="far fa-trash-alt"></i></button>