add confirm prompt to delete file

This commit is contained in:
Simon Smith 2025-03-09 15:10:35 +00:00 committed by GitHub
parent 3b83f4c7a1
commit bdafce51aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -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)}