Disable upload preview

This commit is contained in:
Piotr Rogowski 2022-01-09 13:29:41 +01:00
parent bd56b26a5d
commit bb84f85ef6
No known key found for this signature in database
GPG Key ID: 4A842D702D9C6F8F
1 changed files with 6 additions and 0 deletions

View File

@ -134,6 +134,8 @@ const UploadPage = () => {
const history = useHistory();
const { storageSet, storageGet, storageDelete } = useStorage();
const noop = () => {};
const copyToClipboard = async () => {
if (navigator.clipboard) {
await navigator.clipboard.writeText(shareUrl!);
@ -527,6 +529,7 @@ const UploadPage = () => {
multiple
maxCount={MaxFiles.LOG_FILES}
disabled={isPublished}
onPreview={noop}
accept=".mlg,.csv,.msl"
>
{Object.keys(logFiles).length < MaxFiles.LOG_FILES && uploadButton}
@ -545,6 +548,7 @@ const UploadPage = () => {
iconRender={toothLogIcon}
multiple
maxCount={MaxFiles.TOOTH_LOG_FILES}
onPreview={noop}
accept=".csv"
>
{Object.keys(toothLogFiles).length < MaxFiles.TOOTH_LOG_FILES && uploadButton}
@ -578,6 +582,7 @@ const UploadPage = () => {
onRemove={removeCustomIniFile}
iconRender={iniIcon}
disabled={isPublished}
onPreview={noop}
accept=".ini"
>
{!customIniFile && uploadButton}
@ -629,6 +634,7 @@ const UploadPage = () => {
onRemove={removeTuneFile}
iconRender={tuneIcon}
disabled={isPublished}
onPreview={noop}
accept=".msq"
>
{tuneFile === null && uploadButton}