mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-25 19:01:38 +01:00
- Convert biome-ignore to oxlint-disable-next-line across client app - Fix no-base-to-string with type narrowing instead of suppressions - Fix no-floating-promises with fireAndForget() in proxy app - Fix restrict-template-expressions with String() wrapping - Resolve leftover merge conflict markers in manager.rs - Remove duplicate cmd_plugin_init_errors from lib.rs - Add graphql as explicit dependency in yaak-client Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
import type { GitCommit } from "@yaakapp-internal/git";
|
|
import { formatDistanceToNowStrict } from "date-fns";
|
|
import {
|
|
Table,
|
|
TableBody,
|
|
TableCell,
|
|
TableHead,
|
|
TableHeaderCell,
|
|
TableRow,
|
|
TruncatedWideTableCell,
|
|
} from "@yaakapp-internal/ui";
|
|
|
|
interface Props {
|
|
log: GitCommit[];
|
|
}
|
|
|
|
export function HistoryDialog({ log }: Props) {
|
|
return (
|
|
<div className="pl-5 pr-1 pb-1">
|
|
<Table scrollable className="px-1">
|
|
<TableHead>
|
|
<TableRow>
|
|
<TableHeaderCell>Message</TableHeaderCell>
|
|
<TableHeaderCell>Author</TableHeaderCell>
|
|
<TableHeaderCell>When</TableHeaderCell>
|
|
</TableRow>
|
|
</TableHead>
|
|
<TableBody>
|
|
{log.map((l) => (
|
|
<TableRow key={(l.author.name ?? "") + (l.message ?? "n/a") + l.when}>
|
|
<TruncatedWideTableCell>
|
|
{l.message || <em className="text-text-subtle">No message</em>}
|
|
</TruncatedWideTableCell>
|
|
<TableCell>
|
|
<span title={`Email: ${l.author.email}`}>{l.author.name || "Unknown"}</span>
|
|
</TableCell>
|
|
<TableCell className="text-text-subtle">
|
|
<span title={l.when}>{formatDistanceToNowStrict(l.when)} ago</span>
|
|
</TableCell>
|
|
</TableRow>
|
|
))}
|
|
</TableBody>
|
|
</Table>
|
|
</div>
|
|
);
|
|
}
|