Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/17384

Vanessaddaf16dd9bac
diff --git a/app/src/assets/scss/business/_layout.scss b/app/src/assets/scss/business/_layout.scss
index 0240fce439..4db53c0d87 100644
--- a/app/src/assets/scss/business/_layout.scss
+++ b/app/src/assets/scss/business/_layout.scss
@@ -39,19 +39,6 @@
content: none;
}
- &__dockl {
- margin-right: 4px;
- }
-
- &__dockr {
- margin-left: 4px;
- }
-
- &__dockb {
- margin-top: 4px;
- }
-
-
& > .layout__dockresize {
display: none;
}
diff --git a/app/src/layout/dock/index.ts b/app/src/layout/dock/index.ts
index beec2df387..135646688d 100644
--- a/app/src/layout/dock/index.ts
+++ b/app/src/layout/dock/index.ts
@@ -538,10 +538,15 @@ export class Dock {
target.classList.remove("dock__item--active", "dock__item--activefocus");
// dock 隐藏
if (this.element.querySelectorAll(".dock__item--active").length === 0) {
- if (this.position === "Left" || this.position === "Right") {
+ if (this.position === "Left") {
+ this.layout.element.style.width = "0px";
+ this.layout.element.style.marginRight = "0px";
+ } else if (this.position === "Right") {
this.layout.element.style.width = "0px";
+ this.layout.element.style.marginLeft = "0px";
} else {
this.layout.element.style.height = "0px";
+ this.layout.element.style.marginTop = "0px";
}
this.resizeElement.classList.add("fn__none");
clearTimeout(this.hideResizeTimeout);
@@ -695,10 +700,15 @@ export class Dock {
});
}
// dock 显示
- if (this.position === "Left" || this.position === "Right") {
+ if (this.position === "Left") {
+ this.layout.element.style.width = this.getMaxSize() + "px";
+ this.layout.element.style.marginRight = "4px";
+ } else if (this.position === "Right") {
this.layout.element.style.width = this.getMaxSize() + "px";
+ this.layout.element.style.marginLeft = "4px";
} else {
this.layout.element.style.height = this.getMaxSize() + "px";
+ this.layout.element.style.marginTop = "4px";
}
if ((type === "graph" || type === "globalGraph") && this.layout.element.querySelector(".fullscreen")) {
document.getElementById("drag")?.classList.add("fn__hidden");