Compare commits
2 commits
main
...
v0.25.1-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2ede26af7 | ||
|
|
aafed6e7b1 |
5 changed files with 88 additions and 78 deletions
|
|
@ -8,7 +8,7 @@ runs:
|
|||
- uses: oven-sh/setup-bun@v2
|
||||
name: Install Bun
|
||||
with:
|
||||
bun-version: "1.3.8"
|
||||
bun-version: "1.3.6"
|
||||
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
ARG BUN_VERSION="1.3.8"
|
||||
ARG BUN_VERSION="1.3.6"
|
||||
|
||||
FROM oven/bun:${BUN_VERSION}-alpine AS base
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import type { UseFormReturn } from "react-hook-form";
|
|||
import { Check, Pencil, X, AlertTriangle } from "lucide-react";
|
||||
import { REPOSITORY_BASE } from "~/client/lib/constants";
|
||||
import { Button } from "../../../../components/ui/button";
|
||||
import { FormItem, FormLabel, FormDescription } from "../../../../components/ui/form";
|
||||
import { FormItem, FormLabel, FormDescription, FormField, FormControl } from "../../../../components/ui/form";
|
||||
import { DirectoryBrowser } from "../../../../components/directory-browser";
|
||||
import {
|
||||
AlertDialog,
|
||||
|
|
@ -26,18 +26,24 @@ export const LocalRepositoryForm = ({ form }: Props) => {
|
|||
const [showPathWarning, setShowPathWarning] = useState(false);
|
||||
|
||||
return (
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="path"
|
||||
render={({ field }) => (
|
||||
<>
|
||||
<FormItem>
|
||||
<FormLabel>Repository Directory</FormLabel>
|
||||
<FormControl>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="flex-1 text-sm font-mono bg-muted px-3 py-2 rounded-md border">
|
||||
{form.watch("path") || REPOSITORY_BASE}
|
||||
{field.value || REPOSITORY_BASE}
|
||||
</div>
|
||||
<Button type="button" variant="outline" onClick={() => setShowPathWarning(true)} size="sm">
|
||||
<Pencil className="h-4 w-4 mr-2" />
|
||||
Change
|
||||
</Button>
|
||||
</div>
|
||||
</FormControl>
|
||||
<FormDescription>The directory where the repository will be stored.</FormDescription>
|
||||
</FormItem>
|
||||
|
||||
|
|
@ -54,8 +60,8 @@ export const LocalRepositoryForm = ({ form }: Props) => {
|
|||
If the path is not a host mount, you will lose your repository data when the container restarts.
|
||||
</p>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
The default path <code className="bg-muted px-1 rounded">{REPOSITORY_BASE}</code> is safe to use if you
|
||||
followed the recommended Docker Compose setup.
|
||||
The default path <code className="bg-muted px-1 rounded">{REPOSITORY_BASE}</code> is safe to use if
|
||||
you followed the recommended Docker Compose setup.
|
||||
</p>
|
||||
</AlertDialogDescription>
|
||||
</AlertDialogHeader>
|
||||
|
|
@ -83,8 +89,10 @@ export const LocalRepositoryForm = ({ form }: Props) => {
|
|||
</AlertDialogHeader>
|
||||
<div className="py-4">
|
||||
<DirectoryBrowser
|
||||
onSelectPath={(path) => form.setValue("path", path)}
|
||||
selectedPath={form.watch("path") || REPOSITORY_BASE}
|
||||
onSelectPath={(path) => {
|
||||
field.onChange(path);
|
||||
}}
|
||||
selectedPath={field.value || REPOSITORY_BASE}
|
||||
/>
|
||||
</div>
|
||||
<AlertDialogFooter>
|
||||
|
|
@ -100,5 +108,7 @@ export const LocalRepositoryForm = ({ form }: Props) => {
|
|||
</AlertDialogContent>
|
||||
</AlertDialog>
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
2
bun.lock
2
bun.lock
|
|
@ -78,7 +78,7 @@
|
|||
"@tanstack/react-query-devtools": "^5.91.2",
|
||||
"@testing-library/dom": "^10.4.1",
|
||||
"@testing-library/react": "^16.3.2",
|
||||
"@types/bun": "^1.3.8",
|
||||
"@types/bun": "^1.3.6",
|
||||
"@types/node": "^25.1.0",
|
||||
"@types/react": "^19.2.10",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@
|
|||
"@tanstack/react-query-devtools": "^5.91.2",
|
||||
"@testing-library/dom": "^10.4.1",
|
||||
"@testing-library/react": "^16.3.2",
|
||||
"@types/bun": "^1.3.8",
|
||||
"@types/bun": "^1.3.6",
|
||||
"@types/node": "^25.1.0",
|
||||
"@types/react": "^19.2.10",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
|
|
@ -122,5 +122,5 @@
|
|||
"overrides": {
|
||||
"esbuild": "^0.27.2"
|
||||
},
|
||||
"packageManager": "bun@1.3.8"
|
||||
"packageManager": "bun@1.3.6"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue