Fix ESLint issues
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-05-29 15:52:23 +02:00
parent d765f9c2c3
commit d5fbc24c96
2 changed files with 10 additions and 6 deletions

View File

@ -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"
/>