mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-04 14:22:04 +08:00
This commit is contained in:
parent
79b7e059ea
commit
a7dd56e672
@ -455,7 +455,7 @@ export class Files extends Model {
|
|||||||
window.siyuan.dragElement = undefined;
|
window.siyuan.dragElement = undefined;
|
||||||
});
|
});
|
||||||
this.element.addEventListener("dragover", (event: DragEvent & { target: HTMLElement }) => {
|
this.element.addEventListener("dragover", (event: DragEvent & { target: HTMLElement }) => {
|
||||||
if (window.siyuan.config.readonly) {
|
if (window.siyuan.config.readonly || event.dataTransfer.types.includes(Constants.SIYUAN_DROP_TAB)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const contentRect = this.element.getBoundingClientRect();
|
const contentRect = this.element.getBoundingClientRect();
|
||||||
@ -760,7 +760,7 @@ export class Files extends Model {
|
|||||||
} else {
|
} else {
|
||||||
return `<ul class="b3-list b3-list--background" data-url="${item.id}" data-sort="${item.sort}" data-sortmode="${item.sortMode}">
|
return `<ul class="b3-list b3-list--background" data-url="${item.id}" data-sort="${item.sort}" data-sortmode="${item.sortMode}">
|
||||||
<li class="b3-list-item b3-list-item--hide-action" ${window.siyuan.config.fileTree.sort === 6 ? 'draggable="true"' : ""}
|
<li class="b3-list-item b3-list-item--hide-action" ${window.siyuan.config.fileTree.sort === 6 ? 'draggable="true"' : ""}
|
||||||
style="--file-toggle-width:0px"
|
style="--file-toggle-width:18px"
|
||||||
data-type="navigation-root" data-path="/">
|
data-type="navigation-root" data-path="/">
|
||||||
<span class="b3-list-item__toggle b3-list-item__toggle--hl">
|
<span class="b3-list-item__toggle b3-list-item__toggle--hl">
|
||||||
<svg class="b3-list-item__arrow"><use xlink:href="#iconRight"></use></svg>
|
<svg class="b3-list-item__arrow"><use xlink:href="#iconRight"></use></svg>
|
||||||
@ -1181,12 +1181,12 @@ data-type="navigation-root" data-path="/">
|
|||||||
countHTML = `<span class="popover__block counter b3-tooltips b3-tooltips__nw" aria-label="${window.siyuan.languages.ref}">${item.count}</span>`;
|
countHTML = `<span class="popover__block counter b3-tooltips b3-tooltips__nw" aria-label="${window.siyuan.languages.ref}">${item.count}</span>`;
|
||||||
}
|
}
|
||||||
const ariaLabel = this.genDocAriaLabel(item, escapeAriaLabel);
|
const ariaLabel = this.genDocAriaLabel(item, escapeAriaLabel);
|
||||||
const paddingLeft = `${(item.path.split("/").length - 1) * 18}px`
|
const paddingLeft = (item.path.split("/").length - 1) * 18
|
||||||
return `<li data-node-id="${item.id}" data-name="${Lute.EscapeHTMLStr(item.name)}" draggable="true" data-count="${item.subFileCount}"
|
return `<li data-node-id="${item.id}" data-name="${Lute.EscapeHTMLStr(item.name)}" draggable="true" data-count="${item.subFileCount}"
|
||||||
data-type="navigation-file"
|
data-type="navigation-file"
|
||||||
style="--file-toggle-width:${paddingLeft}"
|
style="--file-toggle-width:${paddingLeft + 18}px"
|
||||||
class="b3-list-item b3-list-item--hide-action" data-path="${item.path}">
|
class="b3-list-item b3-list-item--hide-action" data-path="${item.path}">
|
||||||
<span style="padding-left: ${paddingLeft}" class="b3-list-item__toggle b3-list-item__toggle--hl${item.subFileCount === 0 ? " fn__hidden" : ""}">
|
<span style="padding-left: ${paddingLeft}px" class="b3-list-item__toggle b3-list-item__toggle--hl${item.subFileCount === 0 ? " fn__hidden" : ""}">
|
||||||
<svg class="b3-list-item__arrow"><use xlink:href="#iconRight"></use></svg>
|
<svg class="b3-list-item__arrow"><use xlink:href="#iconRight"></use></svg>
|
||||||
</span>
|
</span>
|
||||||
<span class="b3-list-item__icon b3-tooltips b3-tooltips__n popover__block" data-id="${item.id}" aria-label="${window.siyuan.languages.changeIcon}">${unicode2Emoji(item.icon || (item.subFileCount === 0 ? window.siyuan.storage[Constants.LOCAL_IMAGES].file : window.siyuan.storage[Constants.LOCAL_IMAGES].folder))}</span>
|
<span class="b3-list-item__icon b3-tooltips b3-tooltips__n popover__block" data-id="${item.id}" aria-label="${window.siyuan.languages.changeIcon}">${unicode2Emoji(item.icon || (item.subFileCount === 0 ? window.siyuan.storage[Constants.LOCAL_IMAGES].file : window.siyuan.storage[Constants.LOCAL_IMAGES].folder))}</span>
|
||||||
|
Loading…
Reference in New Issue
Block a user