- {/* For test */}
-
{
- if (v) setVideo({ ...video, status: v as VideoStatus } as Video)
- else setVideo(undefined)
- }}>
- undefined
- queued
- in_progress
- completed
- downloading
- downloaded
- failed
-
- {video === undefined && t('video.undefined')}
- {video && video.status === 'queued' && (
-
-
- {t('video.status.queued')}
-
- )}
- {video && video.status === 'in_progress' && (
-
- )}
- {video && video.status === 'completed' && (
-
-
- {t('video.status.completed')}
-
- )}
- {video && video.status === 'downloading' && (
-
- )}
- {/* TODO: complete video widget */}
- {video && video.status === 'downloaded' &&
}
- {video && video.status === 'failed' && (
-
-
- {t('video.status.failed')}
-
- )}
-
- )
-}
diff --git a/src/renderer/src/pages/video/VideoViewer.tsx b/src/renderer/src/pages/video/VideoViewer.tsx
new file mode 100644
index 0000000000..611665419b
--- /dev/null
+++ b/src/renderer/src/pages/video/VideoViewer.tsx
@@ -0,0 +1,85 @@
+import { Progress, Radio, RadioGroup, Spinner } from '@heroui/react'
+import { Video, VideoStatus } from '@renderer/types/video'
+import { CheckCircleIcon, CircleXIcon } from 'lucide-react'
+import { useState } from 'react'
+import { useTranslation } from 'react-i18next'
+
+export interface VideoProps {
+ video?: Video
+}
+
+export const VideoViewer = ({ video: _video }: VideoProps) => {
+ const { t } = useTranslation()
+ const [video, setVideo] = useState