web: Tidy temporal utilities. (#13755)

This commit is contained in:
Teffen Ellis
2025-04-07 20:37:03 +02:00
committed by GitHub
parent a23bac9d9b
commit 0e83de2697
36 changed files with 204 additions and 123 deletions

View File

@ -2,7 +2,7 @@ import "@goauthentik/admin/blueprints/BlueprintForm";
import "@goauthentik/admin/rbac/ObjectPermissionModal";
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import { EVENT_REFRESH } from "@goauthentik/common/constants";
import { getRelativeTime } from "@goauthentik/common/utils";
import { formatElapsedTime } from "@goauthentik/common/temporal";
import "@goauthentik/components/ak-status-label";
import "@goauthentik/elements/buttons/ActionButton";
import "@goauthentik/elements/buttons/SpinnerButton";
@ -141,7 +141,7 @@ export class BlueprintListPage extends TablePage<BlueprintInstance> {
html`<div>${item.name}</div>
${description ? html`<small>${description}</small>` : html``}`,
html`${BlueprintStatus(item)}`,
html`<div>${getRelativeTime(item.lastApplied)}</div>
html`<div>${formatElapsedTime(item.lastApplied)}</div>
<small>${item.lastApplied.toLocaleString()}</small>`,
html`<ak-status-label ?good=${item.enabled}></ak-status-label>`,
html`<ak-forms-modal>