This commit is contained in:
@ -32,7 +32,7 @@ export function ConvertDiskImageDialog(p: {
|
||||
|
||||
const [filename, setFilename] = React.useState(p.image.file_name + ".qcow2");
|
||||
|
||||
const handleFormatChange = async (value?: string) => {
|
||||
const handleFormatChange = (value?: string) => {
|
||||
setFormat({ format: value ?? ("QCow2" as any) });
|
||||
|
||||
if (value === "QCow2") setFilename(`${p.image.file_name}.qcow2`);
|
||||
@ -93,7 +93,7 @@ export function ConvertDiskImageDialog(p: {
|
||||
<CheckboxInput
|
||||
editable
|
||||
label="Sparse file"
|
||||
checked={format.is_sparse === true}
|
||||
checked={format.is_sparse}
|
||||
onValueChange={(c) => {
|
||||
setFormat({ format: "Raw", is_sparse: c });
|
||||
}}
|
||||
@ -105,7 +105,9 @@ export function ConvertDiskImageDialog(p: {
|
||||
editable
|
||||
label="New image name"
|
||||
value={filename}
|
||||
onValueChange={(s) => setFilename(s ?? "")}
|
||||
onValueChange={(s) => {
|
||||
setFilename(s ?? "");
|
||||
}}
|
||||
size={ServerApi.Config.constraints.disk_image_name_size}
|
||||
helperText="The image name shall contain the proper file extension"
|
||||
/>
|
||||
|
Reference in New Issue
Block a user