diff --git a/src/App.css b/src/App.css index 7f17468..8f860de 100644 --- a/src/App.css +++ b/src/App.css @@ -60,43 +60,45 @@ --radius: 0.5rem; } - .dark { - --background: 222.2 84% 4.9%; - --foreground: 210 40% 98%; + @media (prefers-color-scheme: dark) { + :root { + --background: 222.2 84% 4.9%; + --foreground: 210 40% 98%; - --card: 222.2 84% 4.9%; - --card-foreground: 210 40% 98%; + --card: 222.2 84% 4.9%; + --card-foreground: 210 40% 98%; - --popover: 222.2 84% 4.9%; - --popover-foreground: 210 40% 98%; + --popover: 222.2 84% 4.9%; + --popover-foreground: 210 40% 98%; - --primary: 217.2 91.2% 59.8%; /* blue-500 lighter for dark */ - --primary-foreground: 222.2 47.4% 11.2%; + --primary: 217.2 91.2% 59.8%; /* blue-500 lighter for dark */ + --primary-foreground: 210 40% 98%; - --secondary: 20.5 90.2% 48.2%; /* orange-600 for dark */ - --secondary-foreground: 210 40% 98%; + --secondary: 20.5 90.2% 48.2%; /* orange-600 for dark */ + --secondary-foreground: 210 40% 98%; - --muted: 217.2 32.6% 17.5%; - --muted-foreground: 215 20.2% 65.1%; + --muted: 217.2 32.6% 17.5%; + --muted-foreground: 215 20.2% 65.1%; - --accent: 263.4 70% 50.4%; /* purple-600 for dark */ - --accent-foreground: 210 40% 98%; + --accent: 263.4 70% 50.4%; /* purple-600 for dark */ + --accent-foreground: 210 40% 98%; - --destructive: 0 62.8% 30.6%; /* red-900 */ - --destructive-foreground: 210 40% 98%; + --destructive: 0 62.8% 30.6%; /* red-900 */ + --destructive-foreground: 210 40% 98%; - --success: 142.1 70.6% 45.3%; /* green-500 for dark */ - --success-foreground: 210 40% 98%; + --success: 142.1 70.6% 45.3%; /* green-500 for dark */ + --success-foreground: 210 40% 98%; - --warning: 47.9 95.8% 53.1%; /* amber-400 for dark */ - --warning-foreground: 26 83.3% 14.1%; + --warning: 47.9 95.8% 53.1%; /* amber-400 for dark */ + --warning-foreground: 26 83.3% 14.1%; - --info: 188.7 85.7% 53.3%; /* cyan-500 */ - --info-foreground: 210 40% 98%; + --info: 188.7 85.7% 53.3%; /* cyan-500 */ + --info-foreground: 210 40% 98%; - --border: 217.2 32.6% 17.5%; - --input: 217.2 32.6% 17.5%; - --ring: 224.3 76.3% 48%; + --border: 217.2 32.6% 17.5%; + --input: 217.2 32.6% 17.5%; + --ring: 224.3 76.3% 48%; + } } } diff --git a/src/components/FileUpload.tsx b/src/components/FileUpload.tsx index 30ebfc3..15309ca 100644 --- a/src/components/FileUpload.tsx +++ b/src/components/FileUpload.tsx @@ -21,6 +21,12 @@ import { } from "@heroicons/react/24/solid"; import { createFileService } from "../platform"; import type { IFileService } from "../platform/interfaces/IFileService"; +import { Button } from "@/components/ui/button"; +import { Card, CardContent } from "@/components/ui/card"; +import { Alert, AlertDescription } from "@/components/ui/alert"; +import { Progress } from "@/components/ui/progress"; +import { Loader2 } from "lucide-react"; +import { cn } from "@/lib/utils"; export function FileUpload() { // Machine store @@ -202,31 +208,30 @@ export function FileUpload() { : "text-gray-600 dark:text-gray-400"; return ( -
- {displayFileName} -
- ) : ( -- No pattern loaded -
- )} ++ {displayFileName} +
+ ) : ( ++ No pattern loaded +
+ )} +{isLoading && !pyodideReady ? "File dialog will open automatically when ready" @@ -393,15 +378,22 @@ export function FileUpload() { }} > {pesData && !canUploadPattern(machineStatus) && ( -