diff --git a/frontend/src/components/repo/AddRepoDialog.tsx b/frontend/src/components/repo/AddRepoDialog.tsx index 0c8a11a8..d33c0c9c 100644 --- a/frontend/src/components/repo/AddRepoDialog.tsx +++ b/frontend/src/components/repo/AddRepoDialog.tsx @@ -4,6 +4,7 @@ import { createRepo, discoverRepos } from '@/api/repos' import { Button } from '@/components/ui/button' import { Input } from '@/components/ui/input' import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog' +import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs' import { Loader2 } from 'lucide-react' import { showToast } from '@/lib/toast' import type { DiscoverReposResponse } from '@opencode-manager/shared/types' @@ -99,53 +100,22 @@ export function AddRepoDialog({ open, onOpenChange }: AddRepoDialogProps) { return ( - - + + Add Repository -
+
-
- - - -
+ setRepoType(value as 'remote' | 'local' | 'folder')}> + + Remote + Local + Folder + +
{repoType === 'remote' ? ( @@ -156,7 +126,7 @@ export function AddRepoDialog({ open, onOpenChange }: AddRepoDialogProps) { value={repoUrl} onChange={(e) => handleRepoUrlChange(e.target.value)} disabled={mutation.isPending} - className="bg-[#1a1a1a] border-[#2a2a2a] text-white placeholder:text-zinc-500" + className="bg-[#1a1a1a] border-[#2a2a2a] text-white placeholder:text-zinc-500 min-h-[44px] text-base" />

Full URL or shorthand format (owner/repo for GitHub) @@ -170,10 +140,10 @@ export function AddRepoDialog({ open, onOpenChange }: AddRepoDialogProps) { value={localPath} onChange={(e) => setLocalPath(e.target.value)} disabled={mutation.isPending} - className="bg-[#1a1a1a] border-[#2a2a2a] text-white placeholder:text-zinc-500" + className="bg-[#1a1a1a] border-[#2a2a2a] text-white placeholder:text-zinc-500 min-h-[44px] text-base" />

- Directory name for a new repo, or an absolute path to link an existing Git repo in place so its OpenCode sessions stay attached + Directory name for a new repo, or an absolute path to link an existing Git repo

) : ( @@ -184,57 +154,49 @@ export function AddRepoDialog({ open, onOpenChange }: AddRepoDialogProps) { value={folderPath} onChange={(e) => setFolderPath(e.target.value)} disabled={mutation.isPending} - className="bg-[#1a1a1a] border-[#2a2a2a] text-white placeholder:text-zinc-500" + className="bg-[#1a1a1a] border-[#2a2a2a] text-white placeholder:text-zinc-500 min-h-[44px] text-base" />

- Scans the folder for nested Git repositories and links each one in place so existing OpenCode sessions show up immediately + Scans the folder for nested Git repositories and links each one

)}
- + setBranch(e.target.value)} disabled={mutation.isPending || repoType === 'folder'} - className="bg-[#1a1a1a] border-[#2a2a2a] text-white placeholder:text-zinc-500" + className="bg-[#1a1a1a] border-[#2a2a2a] text-white placeholder:text-zinc-500 min-h-[44px] text-base" />

- {repoType === 'folder' - ? 'Folder discovery links each repository on its current branch' + {repoType === 'folder' + ? 'Links each repository on its current branch' : branch - ? repoType === 'remote' - ? `Clones repository directly to '${branch}' branch` - : localPath?.startsWith('/') - ? `Links the repo in place and checks out '${branch}' branch` - : `Initializes repository with '${branch}' branch` - : repoType === 'remote' - ? "Clones repository to default branch" - : localPath?.startsWith('/') - ? 'Links the repo in place and keeps its current branch' - : "Initializes repository with 'main' branch" + ? `Uses '${branch}' branch` + : 'Uses default branch' }

{showSkipSSHCheckbox && ( -
+
setSkipSSHVerification(e.target.checked)} disabled={mutation.isPending} - className="mt-1 h-4 w-4 rounded border-[#2a2a2a] bg-[#1a1a1a] text-blue-600 focus:ring-blue-600" + className="mt-1 h-5 w-5 rounded border-[#2a2a2a] bg-[#1a1a1a] text-blue-600 focus:ring-blue-600" />

- Auto-accept the SSH host key. Use for self-hosted or internal Git servers. + Auto-accept the SSH host key for self-hosted or internal servers

@@ -243,7 +205,7 @@ export function AddRepoDialog({ open, onOpenChange }: AddRepoDialogProps) {