feat: display token description on user tokens list page

This commit is contained in:
Alexandre Bortoluzzi 2022-05-05 12:51:17 +02:00
parent e3fe9010b7
commit 4cfb8fe482
2 changed files with 8 additions and 0 deletions

View File

@ -134,6 +134,10 @@ function UserTokenList() {
name: t`Application name`,
key: 'application__name',
},
{
name: t`Description`,
key: 'description',
},
{
name: t`Scope`,
key: 'scope',
@ -181,6 +185,7 @@ function UserTokenList() {
headerRow={
<HeaderRow qsConfig={QS_CONFIG}>
<HeaderCell sortKey="application__name">{t`Application Name`}</HeaderCell>
<HeaderCell sortKey="description">{t`Description`}</HeaderCell>
<HeaderCell sortKey="scope">{t`Scope`}</HeaderCell>
<HeaderCell sortKey="expires">{t`Expires`}</HeaderCell>
</HeaderRow>

View File

@ -26,6 +26,9 @@ function UserTokenListItem({ token, isSelected, onSelect, rowIndex }) {
: t`Personal access token`}
</Link>
</Td>
<Td dataLabel={t`Description`} id={`token-description-${token.id}`}>
{toTitleCase(token.description)}
</Td>
<Td dataLabel={t`Scope`} id={`token-scope-${token.id}`}>
{toTitleCase(token.scope)}
</Td>