mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
b72d39e3ec
commit
a5b1173eb1
1 changed files with 5 additions and 6 deletions
|
|
@ -673,11 +673,10 @@ export class Files extends Model {
|
||||||
newElement.classList.remove("dragover", "dragover__bottom", "dragover__top");
|
newElement.classList.remove("dragover", "dragover__bottom", "dragover__top");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const ulSort = newUlElement.getAttribute("data-sortmode");
|
if (newElement.classList.contains("dragover__bottom") || newElement.classList.contains("dragover__top")) {
|
||||||
if ((newElement.classList.contains("dragover__bottom") || newElement.classList.contains("dragover__top")) &&
|
const ulSort = newUlElement.getAttribute("data-sortmode");
|
||||||
(ulSort === "6" || (window.siyuan.config.fileTree.sort === 6 && ulSort === "15"))
|
if (window.siyuan.config.fileTree.sort === 6 && selectRootElements.length > 0 &&
|
||||||
) {
|
newElement.getAttribute("data-path") === "/") {
|
||||||
if (selectRootElements.length > 0 && newElement.getAttribute("data-path") === "/") {
|
|
||||||
if (newElement.classList.contains("dragover__top")) {
|
if (newElement.classList.contains("dragover__top")) {
|
||||||
selectRootElements.forEach(item => {
|
selectRootElements.forEach(item => {
|
||||||
newElement.parentElement.before(item.parentElement);
|
newElement.parentElement.before(item.parentElement);
|
||||||
|
|
@ -694,7 +693,7 @@ export class Files extends Model {
|
||||||
fetchPost("/api/notebook/changeSortNotebook", {
|
fetchPost("/api/notebook/changeSortNotebook", {
|
||||||
notebooks,
|
notebooks,
|
||||||
});
|
});
|
||||||
} else {
|
} else if ((ulSort === "6" || (window.siyuan.config.fileTree.sort === 6 && ulSort === "15")) && selectFileElements.length > 0) {
|
||||||
let hasMove = false;
|
let hasMove = false;
|
||||||
const toDir = pathPosix().dirname(toPath);
|
const toDir = pathPosix().dirname(toPath);
|
||||||
if (fromPaths.length > 0) {
|
if (fromPaths.length > 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue