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/pull/17651

Vanessac6662f219a34
diff --git a/app/appearance/icons/index.html b/app/appearance/icons/index.html
index a83da509a9..ea2a583940 100644
--- a/app/appearance/icons/index.html
+++ b/app/appearance/icons/index.html
@@ -28,6 +28,12 @@
<body>
<h2>SiYuan</h2>
<div class="fn__clear">
+ <div>
+ <svg>
+ <use xlink:href="#iconListTree"></use>
+ </svg>
+ iconListTree
+ </div>
<div>
<svg>
<use xlink:href="#iconPaintBucket"></use>
diff --git a/app/appearance/icons/litheness/icon.js b/app/appearance/icons/litheness/icon.js
index 8ae90ddc51..f6b64d8e8f 100644
--- a/app/appearance/icons/litheness/icon.js
+++ b/app/appearance/icons/litheness/icon.js
@@ -1,5 +1,8 @@
document.body.insertAdjacentHTML('afterbegin', `<svg id="iconsLitheness" style="position: absolute; width: 0; height: 0; overflow: hidden;">
<defs>
+ <symbol id="iconListTree" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
+ <path d="M8 5h13"/><path d="M13 12h8"/><path d="M13 19h8"/><path d="M3 10a2 2 0 0 0 2 2h3"/><path d="M3 5v12a2 2 0 0 0 2 2h3"/>
+ </symbol>
<symbol id="iconPaintBucket" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
<path d="M11 7 6 2"/><path d="M18.992 12H2.041"/><path d="M21.145 18.38A3.34 3.34 0 0 1 20 16.5a3.3 3.3 0 0 1-1.145 1.88c-.575.46-.855 1.02-.855 1.595A2 2 0 0 0 20 22a2 2 0 0 0 2-2.025c0-.58-.285-1.13-.855-1.595"/><path d="m8.5 4.5 2.148-2.148a1.205 1.205 0 0 1 1.704 0l7.296 7.296a1.205 1.205 0 0 1 0 1.704l-7.592 7.592a3.615 3.615 0 0 1-5.112 0l-3.888-3.888a3.615 3.615 0 0 1 0-5.112L5.67 7.33"/>
</symbol>
diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts
index 0a11524db0..e398c85786 100644
--- a/app/src/protyle/gutter/index.ts
+++ b/app/src/protyle/gutter/index.ts
@@ -2045,16 +2045,18 @@ export class Gutter {
focusBlock(nodeElement);
}
}).element);
- window.siyuan.menus.menu.append(new MenuItem({
- id: "foldRecursive",
- icon: "iconFoldUnFold",
- label: window.siyuan.languages.foldRecursive,
- accelerator: window.siyuan.config.keymap.editor.general.foldRecursive?.custom,
- click() {
- foldBlocksRecursively(protyle, [nodeElement]);
- focusBlock(nodeElement);
- }
- }).element);
+ if (["NodeHeading", "NodeListItem", "NodeBlockquote", "NodeCallout", "NodeSuperBlock"].includes(type)) {
+ window.siyuan.menus.menu.append(new MenuItem({
+ id: "foldRecursive",
+ icon: "iconListTree",
+ label: window.siyuan.languages.foldRecursive,
+ accelerator: window.siyuan.config.keymap.editor.general.foldRecursive?.custom,
+ click() {
+ foldBlocksRecursively(protyle, [nodeElement]);
+ focusBlock(nodeElement);
+ }
+ }).element);
+ }
if (!protyle.disabled) {
window.siyuan.menus.menu.append(new MenuItem({
id: "attr",