Hide "Announce Repository" button from UI

Removed the "Announce Repository" button since repository announcement now
happens automatically when creating patches. The button is no longer needed
in the user interface.

Changes:
- Removed AnnounceRepositoryDialog from GitDialog UI
- Removed unused import
- Simplified PR/Patch button layout (no conditional rendering needed)

The AnnounceRepositoryDialog component still exists in the codebase for potential
future use cases (like pre-announcing repos with custom metadata), but it's not
exposed in the main UI since auto-announcement handles the common case.
This commit is contained in:
shakespeare.diy committed 2025-10-15 00:50:07 -05:00
1 parent 958a48f23d
commit b88e2ab4f8
1 file changed
+6 -24
+6 -24
View File
@@ -58,7 +58,6 @@ import { usePullRequests } from '@/hooks/usePullRequests';
import { cn } from '@/lib/utils';
import { findCredentialsForRepo } from '@/lib/gitCredentials';
import { nip19 } from 'nostr-tools';
import { AnnounceRepositoryDialog } from '@/components/git/AnnounceRepositoryDialog';
import { GitManagementDialog } from '@/components/git/GitManagementDialog';
import { MergeDialog } from '@/components/git/MergeDialog';
import { PullRequestDialog } from '@/components/git/PullRequestDialog';
@@ -1018,29 +1017,12 @@ export function GitDialog({ projectId, children, open, onOpenChange }: GitDialog
</div>
)}
{/* Nostr Git Actions */}
{originUrl.startsWith('nostr://') && (
<div className="flex gap-2">
<AnnounceRepositoryDialog
projectId={projectId}
remoteUrl={originUrl}
/>
<PullRequestDialog
projectId={projectId}
currentBranch={gitStatus.currentBranch}
remoteUrl={originUrl}
/>
</div>
)}
{/* Create PR Button for non-Nostr remotes */}
{!originUrl.startsWith('nostr://') && (
<PullRequestDialog
projectId={projectId}
currentBranch={gitStatus.currentBranch}
remoteUrl={originUrl}
/>
)}
{/* Create PR/Patch Button */}
<PullRequestDialog
projectId={projectId}
currentBranch={gitStatus.currentBranch}
remoteUrl={originUrl}
/>
</CardContent>
</Card>
)}