web/admin: hide expiry time if item is set to not expire (#8457)

* web/admin: hide expiry time if item is set to not expire

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* format

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L
2024-02-08 22:51:41 +01:00
committed by GitHub
parent 0b8678f7ee
commit 4dadcc1dfd
6 changed files with 486 additions and 480 deletions

View File

@ -112,7 +112,7 @@ export class TokenListPage extends TablePage<Token> {
: html``}`,
html`<a href="#/identity/users/${item.userObj?.pk}">${item.userObj?.username}</a>`,
html`<ak-status-label type="warning" ?good=${item.expiring}></ak-status-label>`,
html`${item.expires
html`${item.expires && item.expiring
? html`<div>${getRelativeTime(item.expires)}</div>
<small>${item.expires.toLocaleString()}</small>`
: msg("-")}`,

View File

@ -62,7 +62,7 @@ export class UserConsentList extends Table<UserConsent> {
row(item: UserConsent): TemplateResult[] {
return [
html`${item.application.name}`,
html`${item.expires
html`${item.expires && item.expiring
? html`<div>${getRelativeTime(item.expires)}</div>
<small>${item.expires.toLocaleString()}</small>`
: msg("-")}`,