mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
d5d6095070
commit
6e838bb91a
2 changed files with 18 additions and 0 deletions
|
|
@ -284,6 +284,22 @@ html {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
transition: var(--b3-transition);
|
transition: var(--b3-transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.sy__file--disablehover {
|
||||||
|
.b3-list--background .b3-list-item {
|
||||||
|
&:hover {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--hide-action .b3-list-item__action {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
> * {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.counter {
|
.counter {
|
||||||
|
|
|
||||||
|
|
@ -428,6 +428,7 @@ export class Files extends Model {
|
||||||
hideTooltip();
|
hideTooltip();
|
||||||
const liElement = hasClosestByTag(event.target, "LI");
|
const liElement = hasClosestByTag(event.target, "LI");
|
||||||
if (liElement) {
|
if (liElement) {
|
||||||
|
this.parent.panelElement.classList.add("sy__file--disablehover");
|
||||||
let selectElements: Element[] = Array.from(this.element.querySelectorAll(".b3-list-item--focus"));
|
let selectElements: Element[] = Array.from(this.element.querySelectorAll(".b3-list-item--focus"));
|
||||||
if (!liElement.classList.contains("b3-list-item--focus")) {
|
if (!liElement.classList.contains("b3-list-item--focus")) {
|
||||||
selectElements.forEach((item) => {
|
selectElements.forEach((item) => {
|
||||||
|
|
@ -464,6 +465,7 @@ export class Files extends Model {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.element.addEventListener("dragend", () => {
|
this.element.addEventListener("dragend", () => {
|
||||||
|
this.parent.panelElement.classList.remove("sy__file--disablehover");
|
||||||
this.element.querySelectorAll(".b3-list-item--focus").forEach((item: HTMLElement, index) => {
|
this.element.querySelectorAll(".b3-list-item--focus").forEach((item: HTMLElement, index) => {
|
||||||
item.style.opacity = "";
|
item.style.opacity = "";
|
||||||
// https://github.com/siyuan-note/siyuan/issues/11587
|
// https://github.com/siyuan-note/siyuan/issues/11587
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue