feat: delete confirm

close #1
This commit is contained in:
sigoden 2022-05-31 08:01:03 +08:00
parent fb03f7ddb8
commit be3ae2fe00

View file

@ -125,6 +125,8 @@ async function deletePath(index) {
const file = DATA.paths[index]; const file = DATA.paths[index];
if (!file) return; if (!file) return;
if (!confirm(`Delete \`${file.name}\`?`)) return;
try { try {
const res = await fetch(getUrl(file.name), { const res = await fetch(getUrl(file.name), {
method: "DELETE", method: "DELETE",