add upload to Version page

This commit is contained in:
proddy
2025-03-04 20:24:27 +01:00
parent 34c514709a
commit 4991e2b7cd
15 changed files with 41 additions and 18 deletions

View File

@@ -10,7 +10,7 @@ import { useI18nContext } from 'i18n/i18n-react';
import './dragNdrop.css';
const DragNdrop = ({ onFileSelected }) => {
const DragNdrop = ({ text, onFileSelected }) => {
const [file, setFile] = useState<File>();
const [dragged, setDragged] = useState(false);
const inputRef = useRef<HTMLInputElement | null>(null);
@@ -73,7 +73,7 @@ const DragNdrop = ({ onFileSelected }) => {
>
<div className="upload-info">
<CloudUploadIcon sx={{ marginRight: 4 }} color="primary" fontSize="large" />
<p>{LL.UPLOAD_DRAG()}</p>
<p>{text}</p>
</div>
<input

View File

@@ -12,7 +12,7 @@ import { useI18nContext } from 'i18n/i18n-react';
import DragNdrop from './DragNdrop';
import { LinearProgressWithLabel } from './LinearProgressWithLabel';
const SingleUpload = ({ doRestart }) => {
const SingleUpload = ({ text, doRestart }) => {
const [md5, setMd5] = useState<string>();
const [file, setFile] = useState<File>();
const { LL } = useI18nContext();
@@ -73,7 +73,7 @@ const SingleUpload = ({ doRestart }) => {
</Button>
</>
) : (
<DragNdrop onFileSelected={setFile} />
<DragNdrop text={text} onFileSelected={setFile} />
)}
{md5 && (