Skip to content

Commit 9b7306b

Browse files
Move save and delete buttons to bottom of settings form
Cleaner header with just navigation actions, form actions are now at the bottom of the form where they belong.
1 parent dc3a7c7 commit 9b7306b

1 file changed

Lines changed: 41 additions & 39 deletions

File tree

frontend/routes/repositories/$repoId.tsx

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -229,45 +229,6 @@ function RepositoryDetailView() {
229229
<HugeiconsIcon icon={VisualStudioCodeIcon} size={14} strokeWidth={2} data-slot="icon" />
230230
<span className="max-sm:hidden">Editor</span>
231231
</Button>
232-
233-
<AlertDialog>
234-
<AlertDialogTrigger
235-
render={
236-
<Button
237-
variant="ghost"
238-
size="sm"
239-
className="text-muted-foreground hover:text-destructive"
240-
/>
241-
}
242-
>
243-
<HugeiconsIcon icon={Delete02Icon} size={14} strokeWidth={2} data-slot="icon" />
244-
<span className="max-sm:hidden">Delete</span>
245-
</AlertDialogTrigger>
246-
<AlertDialogContent>
247-
<AlertDialogHeader>
248-
<AlertDialogTitle>Delete Repository</AlertDialogTitle>
249-
<AlertDialogDescription>
250-
This will remove "{repository.displayName}" from Vibora. The actual repository
251-
files will not be affected.
252-
</AlertDialogDescription>
253-
</AlertDialogHeader>
254-
<AlertDialogFooter>
255-
<AlertDialogCancel>Cancel</AlertDialogCancel>
256-
<Button variant="destructive" onClick={handleDelete}>
257-
Delete
258-
</Button>
259-
</AlertDialogFooter>
260-
</AlertDialogContent>
261-
</AlertDialog>
262-
263-
<Button
264-
size="sm"
265-
onClick={handleSave}
266-
disabled={!hasChanges || updateRepository.isPending}
267-
>
268-
<HugeiconsIcon icon={Tick02Icon} size={14} strokeWidth={2} data-slot="icon" />
269-
<span className="max-sm:hidden">{updateRepository.isPending ? 'Saving...' : 'Save'}</span>
270-
</Button>
271232
</div>
272233

273234
<span className="text-sm font-medium">{repository.displayName}</span>
@@ -345,6 +306,47 @@ function RepositoryDetailView() {
345306
</FieldDescription>
346307
</Field>
347308
</FieldGroup>
309+
310+
<div className="flex items-center justify-between pt-4 border-t border-border">
311+
<AlertDialog>
312+
<AlertDialogTrigger
313+
render={
314+
<Button
315+
variant="ghost"
316+
size="sm"
317+
className="text-muted-foreground hover:text-destructive"
318+
/>
319+
}
320+
>
321+
<HugeiconsIcon icon={Delete02Icon} size={14} strokeWidth={2} data-slot="icon" />
322+
Delete
323+
</AlertDialogTrigger>
324+
<AlertDialogContent>
325+
<AlertDialogHeader>
326+
<AlertDialogTitle>Delete Repository</AlertDialogTitle>
327+
<AlertDialogDescription>
328+
This will remove "{repository.displayName}" from Vibora. The actual repository
329+
files will not be affected.
330+
</AlertDialogDescription>
331+
</AlertDialogHeader>
332+
<AlertDialogFooter>
333+
<AlertDialogCancel>Cancel</AlertDialogCancel>
334+
<Button variant="destructive" onClick={handleDelete}>
335+
Delete
336+
</Button>
337+
</AlertDialogFooter>
338+
</AlertDialogContent>
339+
</AlertDialog>
340+
341+
<Button
342+
size="sm"
343+
onClick={handleSave}
344+
disabled={!hasChanges || updateRepository.isPending}
345+
>
346+
<HugeiconsIcon icon={Tick02Icon} size={14} strokeWidth={2} data-slot="icon" />
347+
{updateRepository.isPending ? 'Saving...' : 'Save'}
348+
</Button>
349+
</div>
348350
</div>
349351
</div>
350352
</ScrollArea>

0 commit comments

Comments
 (0)