diff --git a/src/view/FileList.svelte b/src/view/FileList.svelte
index 4c94208..b8ff791 100644
--- a/src/view/FileList.svelte
+++ b/src/view/FileList.svelte
@@ -47,9 +47,10 @@
let newFolderModal = false;
let newFolder = "";
let deleteSelectedModal = false;
+ let deleteModal = false;
let renameModal = false;
let renameValue = "";
- let renameInode: Inode;
+ let menuInode: Inode;
$: {
listFiles(path);
@@ -86,10 +87,13 @@
async function renameFile() {
renameModal = false;
- await fs.moveFile(
- renameInode.path,
- parent(renameInode.path) + renameValue
- );
+ await fs.moveFile(menuInode.path, parent(menuInode.path) + renameValue);
+ fileListUpdateIncr();
+ }
+
+ async function deleteFile() {
+ deleteModal = false;
+ await fs.deleteFile(menuInode.path);
fileListUpdateIncr();
}
@@ -196,11 +200,18 @@
Are you sure you want to delete {checked.length} files?
+Are you sure you want to delete the file {menuInode?.basename}
?