mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
🎨 从工作空间列表中移除
This commit is contained in:
parent
c50400428b
commit
de8949d88d
8 changed files with 52 additions and 30 deletions
|
|
@ -476,16 +476,14 @@ ${accountHTML}
|
|||
break;
|
||||
} else if (target.getAttribute("data-type") === "remove") {
|
||||
const p = target.parentElement.getAttribute("data-path");
|
||||
confirmDialog("⚠️ " + window.siyuan.languages.remove + " " + pathPosix().basename(p), window.siyuan.languages.removeWorkspaceTip, () => {
|
||||
fetchPost("/api/system/removeWorkspaceDir", {path: p}, () => {
|
||||
genWorkspace(workspaceDirElement);
|
||||
});
|
||||
fetchPost("/api/system/removeWorkspaceDir", {path: p}, () => {
|
||||
genWorkspace(workspaceDirElement);
|
||||
});
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
break;
|
||||
} else if (target.classList.contains("b3-list-item") && !target.classList.contains("b3-list-item--focus")) {
|
||||
confirmDialog(window.siyuan.languages.confirm,`${pathPosix().basename(window.siyuan.config.system.workspaceDir)} -> ${pathPosix().basename(target.getAttribute("data-path"))}?`, () => {
|
||||
confirmDialog(window.siyuan.languages.confirm, `${pathPosix().basename(window.siyuan.config.system.workspaceDir)} -> ${pathPosix().basename(target.getAttribute("data-path"))}?`, () => {
|
||||
fetchPost("/api/system/setWorkspaceDir", {
|
||||
path: target.getAttribute("data-path")
|
||||
}, () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue