diff --git a/dashboard/bun.lockb b/dashboard/bun.lockb index 92f5ffc..4148b6f 100755 Binary files a/dashboard/bun.lockb and b/dashboard/bun.lockb differ diff --git a/dashboard/package.json b/dashboard/package.json index d5a5cb5..589ca60 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -22,6 +22,7 @@ "@radix-ui/react-select": "^2.1.6", "@radix-ui/react-separator": "^1.1.0", "@radix-ui/react-slot": "^1.1.1", + "@radix-ui/react-switch": "^1.1.3", "@radix-ui/react-tabs": "^1.1.1", "@radix-ui/react-tooltip": "^1.1.4", "@serwist/next": "^9.0.0-preview.21", diff --git a/dashboard/src/app/globals.css b/dashboard/src/app/globals.css index 262da57..65bc799 100644 --- a/dashboard/src/app/globals.css +++ b/dashboard/src/app/globals.css @@ -75,4 +75,15 @@ body { @apply bg-sidebar text-foreground; } +} + + +@layer base { + * { + @apply border-border outline-ring/50; + } + + body { + @apply bg-background text-foreground; + } } \ No newline at end of file diff --git a/dashboard/src/components/forms/client-form.tsx b/dashboard/src/components/forms/client-form.tsx index 84ceebf..76ff0c8 100644 --- a/dashboard/src/components/forms/client-form.tsx +++ b/dashboard/src/components/forms/client-form.tsx @@ -13,9 +13,10 @@ import { AxiosResponse } from 'axios'; import { AlertDialog, AlertDialogContent, AlertDialogHeader, AlertDialogTitle } from '@/components/ui/alert-dialog'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; import { useRouter } from 'next/navigation'; -import { Checkbox } from '@/components/ui/checkbox'; import { Minus } from 'lucide-react'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'; +import { Switch } from '@/components/ui/switch'; +import Link from 'next/link'; interface CreateClientFormProps { action: (data: z.infer) => Promise>; @@ -200,8 +201,7 @@ export function CreateClientForm({ action }: CreateClientFormProps) { - {/* TODO: change to switch */} - @@ -238,7 +238,9 @@ export function CreateClientForm({ action }: CreateClientFormProps) { Policy URI + placeholder="https://myapp.example/privacy_policy" + {...field} + /> A URL string pointing to a human-readable diff --git a/dashboard/src/components/ui/switch.tsx b/dashboard/src/components/ui/switch.tsx new file mode 100644 index 0000000..4c01734 --- /dev/null +++ b/dashboard/src/components/ui/switch.tsx @@ -0,0 +1,29 @@ +'use client'; + +import * as React from 'react'; +import * as SwitchPrimitives from '@radix-ui/react-switch'; + +import { cn } from '@/lib/utils'; + +const Switch = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + + + +)); +Switch.displayName = SwitchPrimitives.Root.displayName; + +export { Switch };