REFACTOR frontend
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import Playbar from "./../components/Playbar";
|
||||
import PlaybackSlider from "./../components/PlaybackSlider";
|
||||
import ClipRangeSlider from "./../components/ClipRangeSlider";
|
||||
import ClipConfig from "./../components/ClipConfig";
|
||||
import Playbar from "./../components/video/Playbar";
|
||||
import PlaybackSlider from "./../components/video/PlaybackSlider";
|
||||
import ClipRangeSlider from "./../components/video/ClipRangeSlider";
|
||||
import ClipConfig from "./../components/video/ClipConfig";
|
||||
import ExportWidget from "../components/video/ExportWidget.tsx";
|
||||
import {editFile, getMetadata, processFile, getProgress} from "../utils/endpoints"
|
||||
import type { VideoMetadata } from "../utils/types.ts";
|
||||
import Box from "../components/Box.tsx";
|
||||
import ExportWidget from "../components/ExportWidget.tsx";
|
||||
|
||||
const ClipEdit = () => {
|
||||
const { id } = useParams();
|
||||
@@ -104,7 +104,7 @@ const ClipEdit = () => {
|
||||
<Playbar
|
||||
video={videoRef.current}
|
||||
videoMetadata={metadata}
|
||||
className={"w-full accent-primary text-text"}
|
||||
className={"w-full accent-primary"}
|
||||
/>
|
||||
|
||||
<PlaybackSlider
|
||||
@@ -120,7 +120,7 @@ const ClipEdit = () => {
|
||||
videoMetadata={metadata}
|
||||
setSliderValue={setPlaybackValue}
|
||||
setMetadata={setOutputMetadata}
|
||||
className={"w-full mb-10 bg-primary"}
|
||||
className={"w-full mt-2 bg-primary"}
|
||||
/>
|
||||
</Box>}
|
||||
|
||||
@@ -129,7 +129,8 @@ const ClipEdit = () => {
|
||||
dataSend={sendData}
|
||||
handleDownload={handleDownload}
|
||||
downloadable={downloadable}
|
||||
progress={progress} />
|
||||
progress={progress}
|
||||
/>
|
||||
</Box>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -2,6 +2,7 @@ import {useState} from "react";
|
||||
import {useNavigate} from "react-router-dom";
|
||||
import { uploadFile } from "../utils/endpoints"
|
||||
import BlueButton from "../components/buttons/BlueButton.tsx";
|
||||
import Box from "../components/Box.tsx";
|
||||
|
||||
const clipUpload = () => {
|
||||
const [file, setFile] = useState<File | null>(null);
|
||||
@@ -19,7 +20,7 @@ const clipUpload = () => {
|
||||
});
|
||||
|
||||
return (
|
||||
<div className={"flex flex-col justify-between gap-3"}>
|
||||
<Box className={"flex flex-col justify-between gap-3 p-5"}>
|
||||
<input
|
||||
type="file"
|
||||
onChange={(e) => {
|
||||
@@ -30,14 +31,14 @@ const clipUpload = () => {
|
||||
/>
|
||||
|
||||
<BlueButton
|
||||
onClick={press}
|
||||
>Upload</BlueButton>
|
||||
onClick={press}>
|
||||
Upload
|
||||
</BlueButton>
|
||||
|
||||
{noFileError &&
|
||||
<label className={"text-center text-red-500"}>Please choose a file</label>
|
||||
}
|
||||
|
||||
</div>
|
||||
</Box>
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user