({
entry,
isSelected,
compact = false,
onSelect,
onContextMenu,
}: GitLogEntryRowProps)
| 451 | }; |
| 452 | |
| 453 | export function GitLogEntryRow({ |
| 454 | entry, |
| 455 | isSelected, |
| 456 | compact = false, |
| 457 | onSelect, |
| 458 | onContextMenu, |
| 459 | }: GitLogEntryRowProps) { |
| 460 | return ( |
| 461 | <div |
| 462 | className={`git-log-entry ${compact ? "git-log-entry-compact" : ""} ${isSelected ? "active" : ""}`} |
| 463 | onClick={() => onSelect?.(entry)} |
| 464 | onContextMenu={onContextMenu} |
| 465 | role="button" |
| 466 | tabIndex={0} |
| 467 | onKeyDown={(event) => { |
| 468 | if (event.key === "Enter" || event.key === " ") { |
| 469 | event.preventDefault(); |
| 470 | onSelect?.(entry); |
| 471 | } |
| 472 | }} |
| 473 | > |
| 474 | <div className="git-log-summary">{entry.summary || "No message"}</div> |
| 475 | <div className="git-log-meta"> |
| 476 | <span className="git-log-sha">{entry.sha.slice(0, 7)}</span> |
| 477 | <span className="git-log-sep">·</span> |
| 478 | <span className="git-log-author">{entry.author || "Unknown"}</span> |
| 479 | <span className="git-log-sep">·</span> |
| 480 | <span className="git-log-date">{formatRelativeTime(entry.timestamp * 1000)}</span> |
| 481 | </div> |
| 482 | </div> |
| 483 | ); |
| 484 | } |
| 485 | |
| 486 | export function WorktreeApplyIcon({ success }: { success: boolean }) { |
| 487 | if (success) { |
nothing calls this directly
no test coverage detected