An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:recycle: fix https://github.com/siyuan-note/siyuan/issues/7449
Vanessaa5bee1533b1c
diff --git a/app/src/assets/template/app/index.tpl b/app/src/assets/template/app/index.tplindex 768f0964cd..7f98b55909 100644--- a/app/src/assets/template/app/index.tpl+++ b/app/src/assets/template/app/index.tpl@@ -19,7 +19,7 @@<div id="layouts" class="layout fn__flex-1"></div><div id="dockRight" class="dock dock--vertical"></div></div>-<div id="dockBottom" class="dock"></div>+<div id="dockBottom" class="dock fn__none"></div><div id="status" class="fn__flex status"></div><div id="commonMenu" class="b3-menu fn__none"></div><div id="message" class="b3-snackbars"></div>diff --git a/app/src/assets/template/desktop/index.tpl b/app/src/assets/template/desktop/index.tplindex 5ef84704d5..ad983e925b 100644--- a/app/src/assets/template/desktop/index.tpl+++ b/app/src/assets/template/desktop/index.tpl@@ -21,7 +21,7 @@<div id="layouts" class="layout fn__flex-1"></div><div id="dockRight" class="dock dock--vertical"></div></div>-<div id="dockBottom" class="dock"></div>+<div id="dockBottom" class="dock fn__none"></div><div id="status" class="fn__flex status"></div><div id="commonMenu" class="b3-menu fn__none"></div><div id="message" class="b3-snackbars"></div>diff --git a/app/src/constants.ts b/app/src/constants.tsindex 8bba683e4e..8eda7330c5 100644--- a/app/src/constants.ts+++ b/app/src/constants.ts@@ -313,13 +313,13 @@ export abstract class Constants {data: [[{type: "file",- size: {width: 224, height: 0},+ size: {width: 227, height: 0},show: true,icon: "iconFiles",hotkeyLangId: "fileTree",}, {type: "outline",- size: {width: 224, height: 0},+ size: {width: 227, height: 0},show: false,icon: "iconAlignCenter",hotkeyLangId: "outline",@@ -331,13 +331,13 @@ export abstract class Constants {hotkeyLangId: "inbox",}], [{type: "bookmark",- size: {width: 224, height: 0},+ size: {width: 227, height: 0},show: false,icon: "iconBookmark",hotkeyLangId: "bookmark",}, {type: "tag",- size: {width: 224, height: 0},+ size: {width: 227, height: 0},show: false,icon: "iconTags",hotkeyLangId: "tag",diff --git a/app/src/layout/Wnd.ts b/app/src/layout/Wnd.tsindex 4019d9f7f4..0b2b282c3f 100644--- a/app/src/layout/Wnd.ts+++ b/app/src/layout/Wnd.ts@@ -47,7 +47,7 @@ export class Wnd {this.element = document.createElement("div");this.element.classList.add("fn__flex-1", "fn__flex");let dragHTML = '<div class="layout-tab-container__drag fn__none"></div>';- if (parentType === "left" || parentType === "right" || parentType === "top" || parentType === "bottom") {+ if (parentType === "left" || parentType === "right" || parentType === "bottom") {dragHTML = "";}this.element.innerHTML = `<div data-type="wnd" data-id="${this.id}" class="fn__flex-column fn__flex fn__flex-1">@@ -657,7 +657,7 @@ export class Wnd {if (this.children.length === 1) {this.destroyModel(this.children[0].model);this.children = [];- if (["top", "bottom", "left", "right"].includes(this.parent.type)) {+ if (["bottom", "left", "right"].includes(this.parent.type)) {item.panelElement.remove();} else {this.remove();diff --git a/app/src/layout/util.ts b/app/src/layout/util.tsindex 08292ecd11..ed9b69bbf4 100644--- a/app/src/layout/util.ts+++ b/app/src/layout/util.ts@@ -402,9 +402,9 @@ export const layoutToJSON = (layout: Layout | Wnd | Tab | Model, json: any) => {if (layout instanceof Layout || layout instanceof Wnd) {if (layout instanceof Layout &&- (layout.type === "top" || layout.type === "bottom" || layout.type === "left" || layout.type === "right")) {+ (layout.type === "bottom" || layout.type === "left" || layout.type === "right")) {// 四周布局使用默认值,清空内容,重置时使用 dock 数据- if (layout.type === "top" || layout.type === "bottom") {+ if (layout.type === "bottom") {json.children = [{"instance": "Wnd","children": []@@ -604,7 +604,7 @@ export const addResize = (obj: Layout | Wnd) => {}const getMinSize = (element: HTMLElement) => {- let minSize = 224;+ let minSize = 227;Array.from(element.querySelectorAll(".file-tree")).find((item) => {if (item.classList.contains("sy__backlink") || item.classList.contains("sy__graph")|| item.classList.contains("sy__globalGraph") || item.classList.contains("sy__inbox")) {@@ -644,14 +644,9 @@ export const addResize = (obj: Layout | Wnd) => {const previousElement = resizeElement.previousElementSibling as HTMLElement;nextElement.style.overflow = "auto"; // 拖动时 layout__resize 会出现 https://github.com/siyuan-note/siyuan/issues/6221previousElement.style.overflow = "auto";- if (!nextElement.nextElementSibling) {- if (!previousElement.previousElementSibling) {- setSize(previousElement, direction);- } else {- setSize(nextElement, direction);- }- } else if (nextElement.nextElementSibling?.nextElementSibling &&- nextElement.parentElement.lastElementChild.isSameNode(nextElement.nextElementSibling.nextElementSibling)) {+ if (!nextElement.nextElementSibling || nextElement.nextElementSibling.classList.contains("layout__dockresize")) {+ setSize(nextElement, direction);+ } else {setSize(previousElement, direction);}const x = event[direction === "lr" ? "clientX" : "clientY"];@@ -684,6 +679,10 @@ export const addResize = (obj: Layout | Wnd) => {nextNowSize < getMinSize(nextElement)) {return;}+ if (window.siyuan.layout.bottomDock?.layout.element.isSameNode(nextElement) &&+ nextNowSize < 64) {+ return;+ }if (!previousElement.classList.contains("fn__flex-1")) {previousElement.style[direction === "lr" ? "width" : "height"] = previousNowSize + "px";}diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.tsindex f497dfc563..a4776a015d 100644--- a/app/src/types/index.d.ts+++ b/app/src/types/index.d.ts@@ -1,4 +1,4 @@-type TLayout = "normal" | "top" | "bottom" | "left" | "right" | "center"+type TLayout = "normal" | "bottom" | "left" | "right" | "center"type TSearchFilter = "mathBlock" | "table" | "blockquote" | "superBlock" | "paragraph" | "document" | "heading"| "list" | "listItem" | "codeBlock" | "htmlBlock"type TDirection = "lr" | "tb"@@ -12,7 +12,7 @@ type TDockType =| "backlink"| "backlinkOld"| "inbox"-type TDockPosition = "Left" | "Right" | "Top" | "Bottom"+type TDockPosition = "Left" | "Right" | "Bottom"type TWS = "main" | "filetree" | "protyle"type TEditorMode = "preview" | "wysiwyg"type TOperation =