This commit is contained in:
@ -96,7 +96,7 @@ function UploadIsoFileCard(p: {
|
||||
p.onFileUploaded();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
await alert("Failed to perform file upload! " + e);
|
||||
await alert(`Failed to perform file upload! ${e}`);
|
||||
}
|
||||
|
||||
setUploadProgress(null);
|
||||
@ -120,7 +120,9 @@ function UploadIsoFileCard(p: {
|
||||
value={value}
|
||||
onChange={handleChange}
|
||||
style={{ flex: 1 }}
|
||||
inputProps={{ accept: ServerApi.Config.iso_mimetypes.join(",") }}
|
||||
slotProps={{
|
||||
htmlInput: { accept: ServerApi.Config.iso_mimetypes.join(",") },
|
||||
}}
|
||||
/>
|
||||
|
||||
{value && <Button onClick={upload}>Upload file</Button>}
|
||||
@ -166,14 +168,18 @@ function UploadIsoFileFromUrlCard(p: {
|
||||
label="URL"
|
||||
value={url}
|
||||
style={{ flex: 3 }}
|
||||
onChange={(e) => { setURL(e.target.value); }}
|
||||
onChange={(e) => {
|
||||
setURL(e.target.value);
|
||||
}}
|
||||
/>
|
||||
<span style={{ width: "10px" }}></span>
|
||||
<TextField
|
||||
label="Filename"
|
||||
value={actualFileName}
|
||||
style={{ flex: 2 }}
|
||||
onChange={(e) => { setFilename(e.target.value); }}
|
||||
onChange={(e) => {
|
||||
setFilename(e.target.value);
|
||||
}}
|
||||
/>
|
||||
{url !== "" && actualFileName !== "" && (
|
||||
<Button onClick={upload}>Upload file</Button>
|
||||
@ -238,7 +244,7 @@ function IsoFilesList(p: {
|
||||
</Typography>
|
||||
);
|
||||
|
||||
const columns: GridColDef[] = [
|
||||
const columns: GridColDef<IsoFile>[] = [
|
||||
{ field: "filename", headerName: "File name", flex: 3 },
|
||||
{
|
||||
field: "size",
|
||||
@ -303,7 +309,6 @@ function IsoFilesList(p: {
|
||||
getRowId={(c) => c.filename}
|
||||
rows={p.list}
|
||||
columns={columns}
|
||||
autoHeight={true}
|
||||
/>
|
||||
</VirtWebPaper>
|
||||
</>
|
||||
|
Reference in New Issue
Block a user