From be3ae2fe0077f602e643b88c09237b8c5372879f Mon Sep 17 00:00:00 2001 From: sigoden Date: Tue, 31 May 2022 08:01:03 +0800 Subject: [PATCH] feat: delete confirm close #1 --- src/assets/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/assets/index.js b/src/assets/index.js index 4da39b2..db4846d 100644 --- a/src/assets/index.js +++ b/src/assets/index.js @@ -125,6 +125,8 @@ async function deletePath(index) { const file = DATA.paths[index]; if (!file) return; + if (!confirm(`Delete \`${file.name}\`?`)) return; + try { const res = await fetch(getUrl(file.name), { method: "DELETE",