| 31 | 31 | | |
| 32 | 32 | | import type { Route } from "./+types/actions-run"; |
| 33 | 33 | | import { page } from "../../lib/meta"; |
| 34 | | − | import { LogText, Notes, StatusIcon, duration, shortRef, standingWord, useJobLog } from "../../components/actions"; |
| 34 | + | import { Duration, LogText, Notes, StatusIcon, shortRef, standingWord, useJobLog } from "../../components/actions"; |
| 35 | 35 | | import { Markdown } from "../../components/markdown"; |
| 36 | 36 | | import { Button, ErrorText, SubmitButton, TimeAgo, usePending } from "../../components/ui"; |
| 37 | 37 | | import { CheckboxOption } from "../../components/ui/checkbox"; |
| ⋯ |
| 150 | 150 | | {matches} {matches === 1 ? "line" : "lines"} |
| 151 | 151 | | </span> |
| 152 | 152 | | )} |
| 153 | | − | <span className="ml-auto shrink-0 font-mono text-xs text-faint">{duration(step.startedAt, step.finishedAt)}</span> |
| 153 | + | <Duration className="ml-auto shrink-0 font-mono text-xs text-faint" start={step.startedAt} end={step.finishedAt} /> |
| 154 | 154 | | </summary> |
| 155 | 155 | | <div className="border-t border-line bg-bg/60"> |
| 156 | 156 | | {text === undefined ? ( |
| ⋯ |
| 365 | 365 | | <h3 className="text-base font-semibold">{job.name}</h3> |
| 366 | 366 | | <span className="text-sm text-muted"> |
| 367 | 367 | | {job.cancelling ? "Cancelling: running its cleanup steps" : standingWord({ ...job, of: "job" })} |
| 368 | | − | {job.startedAt && ` · ${duration(job.startedAt, job.finishedAt)}`} |
| 368 | + | {job.startedAt && ( |
| 369 | + | <> |
| 370 | + | {" · "} |
| 371 | + | <Duration start={job.startedAt} end={job.finishedAt} /> |
| 372 | + | </> |
| 373 | + | )} |
| 369 | 374 | | </span> |
| 370 | 375 | | <span className="ml-auto flex items-center gap-2"> |
| 371 | 376 | | {rerun} |
| ⋯ |
| 776 | 781 | | {run.event} |
| 777 | 782 | | {run.actor && ` by ${run.actor}`} · <TimeAgo at={run.createdAt} /> |
| 778 | 783 | | </span> |
| 779 | | − | {run.startedAt && <span className="font-mono text-xs">{duration(run.startedAt, run.finishedAt)}</span>} |
| 784 | + | {run.startedAt && <Duration className="font-mono text-xs" start={run.startedAt} end={run.finishedAt} />} |
| 780 | 785 | | {run.attempt > 1 && attempts.length <= 1 && <span>Attempt {run.attempt}</span>} |
| 781 | 786 | | {cancelling && <span className="text-warn">Its jobs are running their cleanup steps</span>} |
| 782 | 787 | | {detail.approval?.state === "approved" && detail.approval.approvedBy && <span>Approved by {detail.approval.approvedBy}</span>} |
| ⋯ |
| 868 | 873 | | > |
| 869 | 874 | | <StatusIcon status={job.status} conclusion={job.conclusion} of="job" environment={job.environment} size={14} /> |
| 870 | 875 | | <span className="min-w-0 truncate">{job.name}</span> |
| 871 | | − | <span className="ml-auto shrink-0 font-mono text-xs text-faint">{duration(job.startedAt, job.finishedAt)}</span> |
| 876 | + | <Duration className="ml-auto shrink-0 font-mono text-xs text-faint" start={job.startedAt} end={job.finishedAt} /> |
| 872 | 877 | | </Link> |
| 873 | 878 | | ))} |
| 874 | 879 | | </nav> |