diff --git a/frontend/public/logo.png b/frontend/public/logo.png new file mode 100644 index 0000000..c625415 Binary files /dev/null and b/frontend/public/logo.png differ diff --git a/frontend/src/components/Box.tsx b/frontend/src/components/Box.tsx new file mode 100644 index 0000000..c0d857f --- /dev/null +++ b/frontend/src/components/Box.tsx @@ -0,0 +1,16 @@ +import clsx from "clsx"; + +type props = { + children: React.ReactNode, + className?: string +} + +const Box = ({children, className}: props) => { + return ( +
+ { children } +
+ ) +} + +export default Box; \ No newline at end of file diff --git a/frontend/src/components/ClipConfig.tsx b/frontend/src/components/ClipConfig.tsx index 97d676e..d5e2f7f 100644 --- a/frontend/src/components/ClipConfig.tsx +++ b/frontend/src/components/ClipConfig.tsx @@ -32,22 +32,23 @@ export default function ClipConfig({setMetadata, className}: prop) { return (
-

Clip Export Settings

+

Export Settings

+
@@ -55,6 +56,7 @@ export default function ClipConfig({setMetadata, className}: prop) { +
; + handleDownload: React.MouseEventHandler; + downloadable: boolean; + progress: number +} + +const ExportWidget = ({dataSend, handleDownload, downloadable, progress}: props) => { + return ( +
+ + Export + + + { downloadable ? + ( + Download + ) + :( + + ) + } +
+ ) +} + +export default ExportWidget; \ No newline at end of file diff --git a/frontend/src/components/Sidebar.tsx b/frontend/src/components/Sidebar.tsx index 13ae146..1755747 100644 --- a/frontend/src/components/Sidebar.tsx +++ b/frontend/src/components/Sidebar.tsx @@ -1,7 +1,8 @@ import { Link } from "react-router-dom"; import clsx from "clsx"; import MenuButton from "./buttons/MenuButton.tsx"; -import { Plus, Film } from 'lucide-react'; +import { Plus, Film, Home } from 'lucide-react'; +import Box from "./Box.tsx"; type props = { className?: string @@ -9,10 +10,25 @@ type props = { const Sidebar = ({className}: props) => { return ( -
+ + {"VoD + to={"/"} + > + + Home + + + + Create Clip @@ -20,7 +36,7 @@ const Sidebar = ({className}: props) => { My Clips -
+ ); }; diff --git a/frontend/src/index.css b/frontend/src/index.css index 18989d4..90c61ce 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -28,20 +28,16 @@ background: var(--color-primary); } -/*:root {*/ -/* font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;*/ -/* line-height: 1.5;*/ -/* font-weight: 400;*/ +:root { + font-family: Helvetica; + line-height: 1.5; + font-weight: 400; -/* color-scheme: light dark;*/ -/* color: rgba(255, 255, 255, 0.87);*/ -/* background-color: #242424;*/ - -/* font-synthesis: none;*/ -/* text-rendering: optimizeLegibility;*/ -/* -webkit-font-smoothing: antialiased;*/ -/* -moz-osx-font-smoothing: grayscale;*/ -/*}*/ + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} /*a {*/ /* font-weight: 500;*/ diff --git a/frontend/src/pages/ClipEdit.tsx b/frontend/src/pages/ClipEdit.tsx index 3c9d879..244eb7d 100644 --- a/frontend/src/pages/ClipEdit.tsx +++ b/frontend/src/pages/ClipEdit.tsx @@ -6,7 +6,8 @@ import ClipRangeSlider from "./../components/ClipRangeSlider"; import ClipConfig from "./../components/ClipConfig"; import {editFile, getMetadata, processFile, getProgress} from "../utils/endpoints" import type { VideoMetadata } from "../utils/types.ts"; -import BlueButton from "../components/buttons/BlueButton.tsx"; +import Box from "../components/Box.tsx"; +import ExportWidget from "../components/ExportWidget.tsx"; const ClipEdit = () => { const { id } = useParams(); @@ -51,9 +52,7 @@ const ClipEdit = () => { }, 500); } - const handleDownload = async (filename: string | undefined) => { - if (!filename) return; - + const handleDownload = async () => { const response = await fetch(`/api/v1/download/output/${id}`); if (!response.ok) { @@ -66,7 +65,7 @@ const ClipEdit = () => { const a = document.createElement('a'); a.href = url; - a.download = filename; + a.download = `${id}.mp4`; document.body.appendChild(a); a.click(); a.remove(); @@ -82,7 +81,7 @@ const ClipEdit = () => { }, [id]); return ( -
+
- + + + + {metadata && -
+ { setMetadata={setOutputMetadata} className={"w-full mb-10 bg-primary"} /> -
} + } -
- - Export - - - { downloadable ? - ( handleDownload(id)}> - Download - ) - :( - - ) - } -
+ + +
); }