Refacto storage tab

This commit is contained in:
2024-01-02 19:58:36 +01:00
parent 767d2015df
commit a8046ebff8
2 changed files with 43 additions and 34 deletions

View File

@ -23,27 +23,6 @@ export function VMSelectIsoInput(p: {
return (
<>
<SelectInput
label="Attach an ISO file"
editable={p.editable}
value={undefined}
onValueChange={(v) => {
if (v) {
p.attachedISOs.push(v);
p.onChange(p.attachedISOs);
}
}}
options={[
{ label: "None", value: undefined },
...p.isoList.map((i) => {
return {
label: `${i.filename} ${filesize(i.size)}`,
value: i.filename,
};
}),
]}
/>
{p.attachedISOs.map((isoName, num) => {
const iso = p.isoList.find((d) => d.filename === isoName);
return (
@ -78,6 +57,27 @@ export function VMSelectIsoInput(p: {
</ListItem>
);
})}
<SelectInput
label="Attach an ISO file"
editable={p.editable}
value={undefined}
onValueChange={(v) => {
if (v) {
p.attachedISOs.push(v);
p.onChange(p.attachedISOs);
}
}}
options={[
{ label: "None", value: undefined },
...p.isoList.map((i) => {
return {
label: `${i.filename} ${filesize(i.size)}`,
value: i.filename,
};
}),
]}
/>
</>
);
}