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

Vanessa1147a3c2003b
diff --git a/app/src/dialog/tooltip.ts b/app/src/dialog/tooltip.ts
index 16ba0d1381..7af35370fc 100644
--- a/app/src/dialog/tooltip.ts
+++ b/app/src/dialog/tooltip.ts
@@ -124,7 +124,7 @@ export const showTooltip = (
}
}
messageElement.style.top = top + "px";
- messageElement.style.left = left + "px";
+ messageElement.style.left = Math.max(0, left) + "px";
};
export const hideTooltip = () => {
diff --git a/app/src/layout/util.ts b/app/src/layout/util.ts
index 71e26e7599..d58828cde5 100644
--- a/app/src/layout/util.ts
+++ b/app/src/layout/util.ts
@@ -839,6 +839,9 @@ export const addResize = (obj: Layout | Wnd, after = true) => {
nextNowSize < 64 && nextNowSize < nextSize) {
return;
}
+ if (nextElement.classList.contains("layout__center") && nextNowSize <= 148) {
+ return;
+ }
if (!previousElement.classList.contains("fn__flex-1")) {
previousElement.style[direction === "lr" ? "width" : "height"] = previousNowSize + "px";
}
diff --git a/app/src/menus/navigation.ts b/app/src/menus/navigation.ts
index 70b4e6433a..225187bc31 100644
--- a/app/src/menus/navigation.ts
+++ b/app/src/menus/navigation.ts
@@ -813,105 +813,120 @@ export const genImportMenu = (notebookId: string, pathString: string) => {
export const sortMenu = (type: "notebooks" | "notebook", sortMode: number, clickEvent: (sort: number) => void) => {
const sortMenu: IMenu[] = [{
id: "fileNameASC",
- icon: sortMode === 0 ? "iconSelect" : undefined,
+ checked: sortMode === 0,
+ iconHTML: "",
label: window.siyuan.languages.fileNameASC,
click: () => {
clickEvent(0);
}
}, {
id: "fileNameDESC",
- icon: sortMode === 1 ? "iconSelect" : undefined,
+ checked: sortMode === 1,
+ iconHTML: "",
label: window.siyuan.languages.fileNameDESC,
click: () => {
clickEvent(1);
}
}, {
id: "fileNameNatASC",
- icon: sortMode === 4 ? "iconSelect" : undefined,
+ checked: sortMode === 4,
+ iconHTML: "",
label: window.siyuan.languages.fileNameNatASC,
click: () => {
clickEvent(4);
}
}, {
id: "fileNameNatDESC",
- icon: sortMode === 5 ? "iconSelect" : undefined,
+ checked: sortMode === 5,
+ iconHTML: "",
label: window.siyuan.languages.fileNameNatDESC,
click: () => {
clickEvent(5);
}
}, {id: "separator_1", type: "separator"}, {
id: "createdASC",
- icon: sortMode === 9 ? "iconSelect" : undefined,
+ checked: sortMode === 9,
+ iconHTML: "",
label: window.siyuan.languages.createdASC,
click: () => {
clickEvent(9);
}
}, {
id: "createdDESC",
- icon: sortMode === 10 ? "iconSelect" : undefined,
+ checked: sortMode === 10,
+ iconHTML: "",
label: window.siyuan.languages.createdDESC,
click: () => {
clickEvent(10);
}
}, {
id: "modifiedASC",
- icon: sortMode === 2 ? "iconSelect" : undefined,
+ checked: sortMode === 2,
+ iconHTML: "",
label: window.siyuan.languages.modifiedASC,
click: () => {
clickEvent(2);
}
}, {
id: "modifiedDESC",
- icon: sortMode === 3 ? "iconSelect" : undefined,
+ checked: sortMode === 3,
+ iconHTML: "",
label: window.siyuan.languages.modifiedDESC,
click: () => {
clickEvent(3);
}
}, {id: "separator_2", type: "separator"}, {
id: "refCountASC",
- icon: sortMode === 7 ? "iconSelect" : undefined,
+ checked: sortMode === 7,
+ iconHTML: "",
label: window.siyuan.languages.refCountASC,
click: () => {
clickEvent(7);
}
}, {
id: "refCountDESC",
- icon: sortMode === 8 ? "iconSelect" : undefined,
+ checked: sortMode === 8,
+ iconHTML: "",
label: window.siyuan.languages.refCountDESC,
click: () => {
clickEvent(8);
}
}, {id: "separator_3", type: "separator"}, {
id: "docSizeASC",
- icon: sortMode === 11 ? "iconSelect" : undefined,
+ checked: sortMode === 11,
+ iconHTML: "",
label: window.siyuan.languages.docSizeASC,
click: () => {
clickEvent(11);
}
}, {
id: "docSizeDESC",
- icon: sortMode === 12 ? "iconSelect" : undefined,
+ checked: sortMode === 12,
+ iconHTML: "",
label: window.siyuan.languages.docSizeDESC,
click: () => {
clickEvent(12);
}
}, {id: "separator_4", type: "separator"}, {
id: "subDocCountASC",
- icon: sortMode === 13 ? "iconSelect" : undefined,
+ checked: sortMode === 13,
+ iconHTML: "",
label: window.siyuan.languages.subDocCountASC,
click: () => {
clickEvent(13);
}
}, {
id: "subDocCountDESC",
- icon: sortMode === 14 ? "iconSelect" : undefined,
+ checked: sortMode === 14,
+ iconHTML: "",
label: window.siyuan.languages.subDocCountDESC,
click: () => {
clickEvent(14);
}
}, {id: "separator_5", type: "separator"}, {
id: "customSort",
- icon: sortMode === 6 ? "iconSelect" : undefined,
+ checked: sortMode === 6,
+ iconHTML: "",
label: window.siyuan.languages.customSort,
click: () => {
clickEvent(6);
@@ -920,7 +935,8 @@ export const sortMenu = (type: "notebooks" | "notebook", sortMode: number, click
if (type === "notebook") {
sortMenu.push({
id: "sortByFiletree",
- icon: sortMode === 15 ? "iconSelect" : undefined,
+ checked: sortMode === 15,
+ iconHTML: "",
label: window.siyuan.languages.sortByFiletree,
click: () => {
clickEvent(15);