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

@ -1,5 +1,5 @@
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 { AKElement } from "@goauthentik/elements/Base";
import "@goauthentik/elements/EmptyState";
@ -71,7 +71,7 @@ export class SyncStatusTable extends Table<SystemTask> {
good-label=${msg("Finished successfully")}
bad-label=${msg("Finished with errors")}
></ak-status-label>`,
html`<div>${getRelativeTime(item.finishTimestamp)}</div>
html`<div>${formatElapsedTime(item.finishTimestamp)}</div>
<small>${item.finishTimestamp.toLocaleString()}</small>`,
];
}