Skip to content

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

:art: Improve the default notebook icon https://github.com/siyuan-note/siyuan/issues/18095

Daniel64ce47441531
diff --git a/app/appearance/icons/index.html b/app/appearance/icons/index.html
index 5cd66fadba..86a7e674f6 100644
--- a/app/appearance/icons/index.html
+++ b/app/appearance/icons/index.html
@@ -1252,6 +1252,12 @@
</svg>
iconFilesRoot
</div>
+ <div>
+ <svg>
+ <use xlink:href="#iconNotebook"></use>
+ </svg>
+ iconNotebook
+ </div>
<div>
<svg>
<use xlink:href="#iconNewNoteBook"></use>
diff --git a/app/appearance/icons/litheness/icon.js b/app/appearance/icons/litheness/icon.js
index efdb66516a..8561a8865c 100644
--- a/app/appearance/icons/litheness/icon.js
+++ b/app/appearance/icons/litheness/icon.js
@@ -625,6 +625,9 @@ document.body.insertAdjacentHTML('afterbegin', `<svg id="iconsLitheness" style="
<symbol id="iconFilesRoot" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
<path d="M5 7a2 2 0 0 0-2 2v11"/><path d="M5.803 18H5a2 2 0 0 0 0 4h9.5a.5.5 0 0 0 .5-.5V21"/><path d="M9 15V4a2 2 0 0 1 2-2h9.5a.5.5 0 0 1 .5.5v14a.5.5 0 0 1-.5.5H11a2 2 0 0 1 0-4h10"/>
</symbol>
+ <symbol id="iconNotebook" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
+ <path d="M2 6h4"/><path d="M2 10h4"/><path d="M2 14h4"/><path d="M2 18h4"/><rect width="16" height="20" x="4" y="2" rx="2"/><path d="M16 2v20"/>
+ </symbol>
<symbol id="iconNewNoteBook" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 7v6"/><path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20"/><path d="M9 10h6"/>
</symbol>
diff --git a/app/src/emoji/fileTreeIcon.test.ts b/app/src/emoji/fileTreeIcon.test.ts
index ffb22578ff..14bfc26d7f 100644
--- a/app/src/emoji/fileTreeIcon.test.ts
+++ b/app/src/emoji/fileTreeIcon.test.ts
@@ -61,7 +61,7 @@ after(() => {
describe("file tree icon", () => {
it("renders the configured SVG defaults", () => {
- assert.match(getFileTreeIconHTML("", "notebook", "", false, true), /#iconFilesRoot/);
+ assert.match(getFileTreeIconHTML("", "notebook", "", false, true), /#iconNotebook/);
assert.match(getFileTreeIconHTML("", "folder", "", false, true), /#iconFileText/);
assert.match(getFileTreeIconHTML("", "file", "", false, true), /#iconFile/);
});
diff --git a/app/src/emoji/fileTreeIcon.ts b/app/src/emoji/fileTreeIcon.ts
index 5abfc27746..8716c1b5af 100644
--- a/app/src/emoji/fileTreeIcon.ts
+++ b/app/src/emoji/fileTreeIcon.ts
@@ -5,7 +5,7 @@ import {unicode2Emoji} from "./iconValue";
export type TFileTreeDefaultIcon = "notebook" | "folder" | "file";
const FILE_TREE_SVG_ICONS: Record<TFileTreeDefaultIcon, string> = {
- notebook: "iconFilesRoot",
+ notebook: "iconNotebook",
folder: "iconFileText",
file: "iconFile",
};