This commit is contained in:
ct
2025-07-03 03:04:43 +08:00
parent 08935c8a82
commit 8dd7379089

View File

@@ -2,7 +2,7 @@ import { Button } from '@/components/ui/button';
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '@/components/ui/dialog';
import { Progress } from '@/components/ui/progress';
import { Textarea } from '@/components/ui/textarea';
import { CheckCircle, Clock10Icon, Download, Droplets } from 'lucide-react';
import { Clock10Icon, Download, Droplets } from 'lucide-react';
import { useState } from 'react';
const VideoDownloadModal = ({
@@ -68,7 +68,7 @@ const VideoDownloadModal = ({
</DialogHeader>
{!isExporting && !isComplete && (
<div className="space-y-8">
<div className="space-y-4">
<div className="bg-muted/30 rounded-xl border p-6">
<div className="flex items-start gap-3">
<div className="space-y-3">
@@ -90,8 +90,8 @@ const VideoDownloadModal = ({
</div>
</div>
{nonWatermarkVideosLeft > 0 && (
<div className="space-y-4">
<div className="space-y-3">
{nonWatermarkVideosLeft > 0 && (
<Button
onClick={handleExportWithoutWatermark}
className="h-14 w-full text-base font-medium shadow-md transition-all duration-200 hover:shadow-lg"
@@ -99,26 +99,19 @@ const VideoDownloadModal = ({
>
Export without watermark ({nonWatermarkVideosLeft} left)
</Button>
<Button
onClick={handleExportWithWatermark}
variant="outline"
className="hover:bg-muted/50 h-14 w-full border-2 bg-transparent text-base font-medium transition-all duration-200"
size="lg"
>
Export
</Button>
</div>
)}
{/*
<div className="mb-4 flex items-center space-x-2">
<Checkbox id="show-debug" checked={showDebug} onCheckedChange={setShowDebug} />
<label
htmlFor="show-debug"
className="text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
)}
<Button
onClick={handleExportWithWatermark}
variant="outline"
className="hover:bg-muted/50 h-14 w-full border-2 bg-transparent text-base font-medium transition-all duration-200"
size="lg"
>
Debug FFMPEG command
</label>
</div> */}
Export
</Button>
<Button variant="link" onClick={handleClose} className="h-8 w-full">
Close
</Button>
</div>
{showDebug && <Textarea value={ffmpegCommand} readOnly className="mb-4" />}
</div>
@@ -135,8 +128,7 @@ const VideoDownloadModal = ({
)}
</div>
<div className="space-y-2">
<h3 className="text-xl font-semibold">Exporting {exportType === 'without' ? 'without' : 'with'} watermark</h3>
<p className="text-muted-foreground">Please wait while we prepare your export...</p>
<h3 className="text-xl font-semibold">Exporting {exportType === 'without' ? 'without watermark' : 'with'}</h3>
{exportStatus && <p className="text-muted-foreground text-sm text-wrap">{exportStatus}</p>}
</div>
</div>
@@ -150,28 +142,6 @@ const VideoDownloadModal = ({
</div>
</div>
)}
{isComplete && (
<div className="space-y-8 py-4">
<div className="space-y-4 text-center">
<div className="bg-muted mx-auto flex h-16 w-16 items-center justify-center rounded-full">
<CheckCircle className="h-8 w-8" />
</div>
<div className="space-y-2">
<h3 className="text-xl font-semibold">Export Complete!</h3>
<p className="text-muted-foreground">
Your video has been exported successfully {exportType === 'without' ? 'without' : 'with'} watermark.
</p>
</div>
</div>
<div className="flex justify-center">
<Button onClick={handleClose} className="h-12 w-full font-medium">
Close
</Button>
</div>
</div>
)}
</DialogContent>
</Dialog>
);