mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Remove Review button for Nostr patches (not applicable)
Removed the "Review" button for Nostr patches since they can't be checked out as branches. The Nostr git workflow is different: - Patches are standalone events, not git branches - Contributors don't push branches to a shared remote - Repository owners review patches via the Merge dialog which shows the patch content and commits For GitHub/GitLab: - Review button still works (checks out the actual branch) - Branch exists on remote and can be pulled/checked out For Nostr: - Only Merge button shown for repo owners - Merge dialog displays the patch content for review - This aligns with NIP-34 workflow where patches are self-contained
This commit is contained in:
1 parent
6b2b5e6e92
commit
865a7b83b8
1 file changed
+29
-27
@@ -1019,33 +1019,35 @@ export function GitDialog({ projectId, children, open, onOpenChange }: GitDialog
|
||||
<div className="flex items-center gap-2 pl-7">
|
||||
{!pr.isOwner && pr.state === 'open' && (
|
||||
<>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="h-8 text-xs"
|
||||
onClick={async () => {
|
||||
try {
|
||||
await git.checkout({
|
||||
dir: projectPath,
|
||||
ref: pr.sourceBranch,
|
||||
});
|
||||
await refetchGitStatus();
|
||||
toast({
|
||||
title: 'Branch checked out',
|
||||
description: `Switched to ${pr.sourceBranch}`,
|
||||
});
|
||||
} catch (err) {
|
||||
toast({
|
||||
title: 'Checkout failed',
|
||||
description: err instanceof Error ? err.message : 'Unknown error',
|
||||
variant: 'destructive',
|
||||
});
|
||||
}
|
||||
}}
|
||||
>
|
||||
<GitBranch className="h-3 w-3 mr-1" />
|
||||
Review
|
||||
</Button>
|
||||
{!originUrl.startsWith('nostr://') && (
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="h-8 text-xs"
|
||||
onClick={async () => {
|
||||
try {
|
||||
await git.checkout({
|
||||
dir: projectPath,
|
||||
ref: pr.sourceBranch,
|
||||
});
|
||||
await refetchGitStatus();
|
||||
toast({
|
||||
title: 'Branch checked out',
|
||||
description: `Switched to ${pr.sourceBranch}`,
|
||||
});
|
||||
} catch (err) {
|
||||
toast({
|
||||
title: 'Checkout failed',
|
||||
description: err instanceof Error ? err.message : 'Unknown error',
|
||||
variant: 'destructive',
|
||||
});
|
||||
}
|
||||
}}
|
||||
>
|
||||
<GitBranch className="h-3 w-3 mr-1" />
|
||||
Review
|
||||
</Button>
|
||||
)}
|
||||
<MergeDialog
|
||||
projectId={projectId}
|
||||
currentBranch={gitStatus.currentBranch}
|
||||
|
||||
Reference in new issue
Block a user