refactor: refactor the color schema
This commit is contained in:
@@ -213,7 +213,7 @@ export function UploadSection({ onDetectionComplete, onDetectionTypeChange }: Up
|
||||
}
|
||||
|
||||
return (
|
||||
<Card className="bg-white/20 backdrop-blur-md">
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>Upload Video</CardTitle>
|
||||
<CardDescription>
|
||||
@@ -222,8 +222,6 @@ export function UploadSection({ onDetectionComplete, onDetectionTypeChange }: Up
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-4">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
|
||||
{/* Video File Input kept in 2-col row */}
|
||||
{/* File Input */}
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="video-file">Video File</Label>
|
||||
<div className="flex gap-2">
|
||||
@@ -247,7 +245,6 @@ export function UploadSection({ onDetectionComplete, onDetectionTypeChange }: Up
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* JSON File Input */}
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="json-file">GPS JSON File</Label>
|
||||
<div className="flex gap-2">
|
||||
@@ -270,12 +267,9 @@ export function UploadSection({ onDetectionComplete, onDetectionTypeChange }: Up
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{/* Detection Type, Speed, and Method - 3 column row */}
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
{/* Detection Type Selector */}
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="detection-type">Detection Type</Label>
|
||||
<Select
|
||||
@@ -289,16 +283,13 @@ export function UploadSection({ onDetectionComplete, onDetectionTypeChange }: Up
|
||||
<SelectContent>
|
||||
{DETECTION_TYPES.map((type) => (
|
||||
<SelectItem key={type.value} value={type.value}>
|
||||
<div className="flex items-center gap-2">
|
||||
<span>{type.label}</span>
|
||||
</div>
|
||||
<span>{type.label}</span>
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
|
||||
{/* Speed Input */}
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="speed">Vehicle Speed (km/h)</Label>
|
||||
<Input
|
||||
@@ -312,7 +303,6 @@ export function UploadSection({ onDetectionComplete, onDetectionTypeChange }: Up
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Select Method */}
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="select-method">Select Method</Label>
|
||||
<Select
|
||||
@@ -326,9 +316,7 @@ export function UploadSection({ onDetectionComplete, onDetectionTypeChange }: Up
|
||||
<SelectContent>
|
||||
{DETECTION_METHODS.map((method) => (
|
||||
<SelectItem key={method.value} value={method.value}>
|
||||
<div className="flex items-center gap-2">
|
||||
<span>{method.label}</span>
|
||||
</div>
|
||||
<span>{method.label}</span>
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
@@ -336,7 +324,6 @@ export function UploadSection({ onDetectionComplete, onDetectionTypeChange }: Up
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Error Display */}
|
||||
{error && (
|
||||
<div className="flex items-start gap-2 p-3 rounded-lg bg-destructive/10 text-destructive">
|
||||
<AlertCircle className="h-5 w-5 mt-0.5 shrink-0" />
|
||||
@@ -344,12 +331,10 @@ export function UploadSection({ onDetectionComplete, onDetectionTypeChange }: Up
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Upload Button */}
|
||||
<Button
|
||||
onClick={handleUpload}
|
||||
disabled={!file || uploading}
|
||||
className="w-full btn-blue-gradient rounded-full"
|
||||
|
||||
className="w-full"
|
||||
size="lg"
|
||||
>
|
||||
{uploading ? (
|
||||
@@ -365,7 +350,6 @@ export function UploadSection({ onDetectionComplete, onDetectionTypeChange }: Up
|
||||
)}
|
||||
</Button>
|
||||
|
||||
{/* Progress Section */}
|
||||
{uploading && (
|
||||
<div className="space-y-3">
|
||||
<Progress value={progress} className="h-3" />
|
||||
|
||||
Reference in New Issue
Block a user