mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 23:38:49 +01:00
This commit is contained in:
parent
c8680c9fb3
commit
5e6bc7b933
6 changed files with 11 additions and 8 deletions
|
|
@ -49,14 +49,17 @@ export const deleteFiles = (liElements: Element[]) => {
|
|||
} else {
|
||||
const paths: string[] = []
|
||||
liElements.forEach(item => {
|
||||
paths.push(item.getAttribute("data-path"));
|
||||
const dataPath = item.getAttribute("data-path")
|
||||
if(dataPath !== "/") {
|
||||
paths.push(item.getAttribute("data-path"));
|
||||
}
|
||||
})
|
||||
if (paths.includes("/")) {
|
||||
if (paths.length === 0) {
|
||||
showMessage(window.siyuan.languages.notBatchRemove);
|
||||
return;
|
||||
}
|
||||
confirmDialog(window.siyuan.languages.deleteOpConfirm,
|
||||
window.siyuan.languages.confirmRemove.replace("${count}", liElements.length), () => {
|
||||
window.siyuan.languages.confirmRemoveAll, () => {
|
||||
fetchPost("/api/notebook/removeDocs", {
|
||||
paths
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue