Skip to content

Commit

Permalink
🎨 #13671
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Jan 2, 2025
1 parent 79b7e05 commit a7dd56e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/src/layout/dock/Files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ export class Files extends Model {
window.siyuan.dragElement = undefined;
});
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;
}
const contentRect = this.element.getBoundingClientRect();
Expand Down Expand Up @@ -760,7 +760,7 @@ export class Files extends Model {
} else {
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"' : ""}
style="--file-toggle-width:0px"
style="--file-toggle-width:18px"
data-type="navigation-root" data-path="/">
<span class="b3-list-item__toggle b3-list-item__toggle--hl">
<svg class="b3-list-item__arrow"><use xlink:href="#iconRight"></use></svg>
Expand Down Expand Up @@ -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>`;
}
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}"
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}">
<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>
</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>
Expand Down

0 comments on commit a7dd56e

Please sign in to comment.