Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/renderer/components/FileChangesPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -764,22 +764,23 @@ const FileChangesPanelComponent: React.FC<FileChangesPanelProps> = ({
<Spinner size="sm" className="h-3.5 w-3.5" />
</div>
) : pr ? (
<button
type="button"
<Button
variant="outline"
size="sm"
className="h-8 shrink-0 px-2 text-xs"
onClick={(e) => {
e.stopPropagation();
if (pr.url) window.electronAPI?.openExternal?.(pr.url);
}}
className="inline-flex items-center gap-1 rounded border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground"
title={`${pr.title || 'Pull Request'} (#${pr.number})`}
>
{pr.isDraft
? 'Draft'
: String(pr.state).toUpperCase() === 'OPEN'
? 'View PR'
: `PR ${String(pr.state).charAt(0).toUpperCase() + String(pr.state).slice(1).toLowerCase()}`}
<ArrowUpRight className="size-3" />
</button>
<ArrowUpRight className="ml-1.5 h-3.5 w-3.5" />
</Button>
) : branchStatusLoading || (branchAhead !== null && branchAhead > 0) ? (
<PrActionButton
mode={prMode}
Expand Down
Loading