core: include more authenticator details when possible (#15224)
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
@ -7,7 +7,7 @@ import { PaginatedResponse } from "@goauthentik/elements/table/Table";
|
||||
import { Table, TableColumn } from "@goauthentik/elements/table/Table";
|
||||
|
||||
import { msg, str } from "@lit/localize";
|
||||
import { TemplateResult, html } from "lit";
|
||||
import { TemplateResult, html, nothing } from "lit";
|
||||
import { customElement, property } from "lit/decorators.js";
|
||||
|
||||
import { AuthenticatorsApi, Device } from "@goauthentik/api";
|
||||
@ -104,8 +104,11 @@ export class UserDeviceTable extends Table<Device> {
|
||||
row(item: Device): TemplateResult[] {
|
||||
return [
|
||||
html`${item.name}`,
|
||||
html`${deviceTypeName(item)}
|
||||
${item.extraDescription ? ` - ${item.extraDescription}` : ""}`,
|
||||
html`<div>
|
||||
${deviceTypeName(item)}
|
||||
${item.extraDescription ? ` - ${item.extraDescription}` : ""}
|
||||
</div>
|
||||
${item.externalId ? html` <small>${item.externalId}</small> ` : nothing} `,
|
||||
html`${item.confirmed ? msg("Yes") : msg("No")}`,
|
||||
html`${item.created.getTime() > 0
|
||||
? html`<div>${formatElapsedTime(item.created)}</div>
|
||||
|
||||
@ -13,7 +13,7 @@ import "@goauthentik/user/user-settings/mfa/MFADeviceForm";
|
||||
import "@patternfly/elements/pf-tooltip/pf-tooltip.js";
|
||||
|
||||
import { msg, str } from "@lit/localize";
|
||||
import { TemplateResult, html } from "lit";
|
||||
import { TemplateResult, html, nothing } from "lit";
|
||||
import { customElement, property } from "lit/decorators.js";
|
||||
import { ifDefined } from "lit/directives/if-defined.js";
|
||||
|
||||
@ -130,8 +130,14 @@ export class MFADevicesPage extends Table<Device> {
|
||||
row(item: Device): TemplateResult[] {
|
||||
return [
|
||||
html`${item.name}`,
|
||||
html`${deviceTypeName(item)}
|
||||
${item.extraDescription ? ` - ${item.extraDescription}` : ""}`,
|
||||
html`<div>${deviceTypeName(item)}</div>
|
||||
${item.extraDescription
|
||||
? html`
|
||||
<pf-tooltip position="top" content=${item.externalId || ""}>
|
||||
<small>${item.extraDescription}</small>
|
||||
</pf-tooltip>
|
||||
`
|
||||
: nothing} `,
|
||||
html`${item.created.getTime() > 0
|
||||
? html`<div>${formatElapsedTime(item.created)}</div>
|
||||
<small>${item.created.toLocaleString()}</small>`
|
||||
|
||||
Reference in New Issue
Block a user