mirror of https://github.com/jetkvm/kvm.git
add confirm prompt to delete file (#243)
This commit is contained in:
parent
536e823243
commit
5c7accae0d
|
@ -839,7 +839,9 @@ function DeviceFileView({
|
|||
onDelete={() => {
|
||||
const selectedFile = onStorageFiles.find(f => f.name === file.name);
|
||||
if (!selectedFile) return;
|
||||
handleDeleteFile(selectedFile);
|
||||
if (window.confirm("Are you sure you want to delete " + selectedFile.name + "?")) {
|
||||
handleDeleteFile(selectedFile);
|
||||
}
|
||||
}}
|
||||
onSelect={() => handleOnSelectFile(file)}
|
||||
onContinueUpload={() => onNewImageClick(file.name)}
|
||||
|
|
Loading…
Reference in New Issue