An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: fix https://github.com/siyuan-note/siyuan/issues/7407
Vanessa1fc0fa0d869d
diff --git a/app/src/constants.ts b/app/src/constants.tsindex eb46385aed..4a5d514a0a 100644--- a/app/src/constants.ts+++ b/app/src/constants.ts@@ -343,7 +343,7 @@ export abstract class Constants {hotkeyLangId: "outline",}, {type: "inbox",- size: {width: 252, height: 0},+ size: {width: 320, height: 0},show: false,icon: "iconInbox",hotkeyLangId: "inbox",diff --git a/app/src/layout/util.ts b/app/src/layout/util.tsindex 34c51499c5..636107cb2d 100644--- a/app/src/layout/util.ts+++ b/app/src/layout/util.ts@@ -19,7 +19,7 @@ import {Dock} from "./dock";import {focusByRange} from "../protyle/util/selection";import {hideElements} from "../protyle/ui/hideElements";import {fetchPost} from "../util/fetch";-import {hasClosestBlock} from "../protyle/util/hasClosest";+import {hasClosestBlock, hasClosestByClassName} from "../protyle/util/hasClosest";import {getContenteditableElement} from "../protyle/wysiwyg/getBlock";import {Constants} from "../constants";import {openSearch} from "../search/spread";@@ -610,6 +610,20 @@ export const addResize = (obj: Layout | Wnd) => {if (!obj.resize) {return;}++ const getMinSize = (element: HTMLElement) => {+ let minSize = 220;+ 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")) {+ if (!item.classList.contains("fn__none") && !hasClosestByClassName(item, "fn__none")) {+ minSize = 320+ return true;+ }+ }+ })+ return minSize+ }const resizeWnd = (resizeElement: HTMLElement, direction: string) => {const setSize = (item: HTMLElement, direction: string) => {if (item.classList.contains("fn__flex-1")) {@@ -670,10 +684,12 @@ export const addResize = (obj: Layout | Wnd) => {if (previousNowSize < 8 || nextNowSize < 8) {return;}- if (window.siyuan.layout.leftDock?.layout.element.contains(previousElement) && previousNowSize < 220) {+ if (window.siyuan.layout.leftDock?.layout.element.contains(previousElement) &&+ previousNowSize < getMinSize(previousElement)) {return;}- if (window.siyuan.layout.rightDock?.layout.element.contains(nextElement) && nextNowSize < 320) {+ if (window.siyuan.layout.rightDock?.layout.element.contains(nextElement) &&+ nextNowSize < getMinSize(nextElement)) {return;}if (!previousElement.classList.contains("fn__flex-1")) {