This commit is contained in:
Vanessa 2023-09-08 16:07:38 +08:00
parent f2e1a8f8b5
commit 1faa84fdfb

View file

@ -318,8 +318,12 @@ export const initAbout = () => {
event.stopPropagation();
break;
} else if (target.getAttribute("data-type") === "remove") {
fetchPost("/api/system/removeWorkspaceDir", {path: target.parentElement.getAttribute("data-path")}, () => {
const removePath = target.parentElement.getAttribute("data-path");
fetchPost("/api/system/removeWorkspaceDir", {path: removePath}, () => {
genWorkspace(workspaceDirElement);
confirmDialog(window.siyuan.languages.deleteOpConfirm, window.siyuan.languages.removeWorkspacePhysically, () => {
fetchPost("/api/system/removeWorkspaceDirPhysically", {path: removePath});
});
});
event.preventDefault();
event.stopPropagation();