Browse Source

:art: https://github.com/siyuan-note/siyuan/issues/5332

Vanessa 3 năm trước cách đây
mục cha
commit
6ecf512a73
1 tập tin đã thay đổi với 9 bổ sung8 xóa
  1. 9 8
      app/src/util/history.ts

+ 9 - 8
app/src/util/history.ts

@@ -432,14 +432,15 @@ export const openHistory = () => {
                 });
                 });
                 break;
                 break;
             } else if (type === "removeRepoTagSnapshot" || type === "removeCloudRepoTagSnapshot") {
             } else if (type === "removeRepoTagSnapshot" || type === "removeCloudRepoTagSnapshot") {
-                fetchPost("/api/repo/" + type, {
-                    tag: target.parentElement.getAttribute("data-tag")
-                }, () => {
-                    if (target.parentElement.parentElement.childElementCount === 1) {
-                        target.parentElement.parentElement.innerHTML = `<li class="b3-list--empty">${window.siyuan.languages.emptyContent}</li>`
-                    } else {
-                        target.parentElement.remove();
-                    }
+                const tag = target.parentElement.getAttribute("data-tag");
+                confirmDialog(window.siyuan.languages.delete, `${window.siyuan.languages.confirmDelete} <i>${tag}</i>?`, () => {
+                    fetchPost("/api/repo/" + type, {tag}, () => {
+                        if (target.parentElement.parentElement.childElementCount === 1) {
+                            target.parentElement.parentElement.innerHTML = `<li class="b3-list--empty">${window.siyuan.languages.emptyContent}</li>`
+                        } else {
+                            target.parentElement.remove();
+                        }
+                    });
                 });
                 });
             } else if (type === "uploadSnapshot") {
             } else if (type === "uploadSnapshot") {
                 fetchPost("/api/repo/uploadCloudSnapshot", {
                 fetchPost("/api/repo/uploadCloudSnapshot", {