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: https://github.com/siyuan-note/siyuan/issues/8006
Vanessa4822fc1bf789
diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.jsonindex b5b19c169c..98bc9639d7 100644--- a/app/appearance/langs/en_US.json+++ b/app/appearance/langs/en_US.json@@ -593,61 +593,8 @@"pasteEmbed": "Paste Block Embed","cut": "Cut","mentions": "Mentions",- "colorBorder": "Border Color","colorFont": "Font Color",- "colorGraph": "Graph Color",- "colorInline": "Document Inline Color","colorPrimary": "Background Color",- "colorScroll": "Scroll Color",- "colorTab": "Tab Color",- "colorTip": "Tooltip Color",- "--b3-theme-primary": "Primary",- "--b3-theme-primary-light": "Primary - Light",- "--b3-theme-primary-lighter": "Primary - Lighter",- "--b3-theme-primary-lightest": "Primary - Lightest",- "--b3-theme-secondary": "Secondary",- "--b3-theme-background": "Background",- "--b3-theme-surface": "Surface",- "--b3-theme-error": "Error",- "--b3-theme-on-primary": "Font Color On Primary",- "--b3-theme-on-secondary": "Font Color On Secondary",- "--b3-theme-on-background": "Font Color On Background",- "--b3-theme-on-surface": "Font Color On Surface",- "--b3-theme-on-error": "Font Color On Error",- "--b3-border-color": "Border",- "--b3-scroll-color": "Scroll",- "--b3-list-hover": "List Hover Color",- "--b3-tab-background": "Tab Background",- "--b3-tooltips-color": "Tooltip Background",- "--b3-graph-p-point": "Paragraph Point",- "--b3-graph-heading-point": "Title Point",- "--b3-graph-math-point": "Math Point",- "--b3-graph-code-point": "Code Point",- "--b3-graph-table-point": "Table Point",- "--b3-graph-list-point": "List Point",- "--b3-graph-todo-point": "Task list Point",- "--b3-graph-olist-point": "Order list Point",- "--b3-graph-listitem-point": "List item Point",- "--b3-graph-bq-point": "Blockquote Point",- "--b3-graph-super-point": "Super Point",- "--b3-graph-doc-point": "Document Point",- "--b3-graph-tag-point": "Tag Point",- "--b3-graph-asset-point": "Asset Point",- "--b3-graph-line": "Line",- "--b3-graph-ref-line": "Line between link",- "--b3-graph-tag-line": "Line between tag and node",- "--b3-graph-tag-tag-line": "Line between tag and tag",- "--b3-graph-asset-line": "Line between asset and node",- "--b3-graph-hl-point": "Choose Point",- "--b3-graph-hl-line": "Choose Line",- "--b3-protyle-inline-strong-color": "Bold",- "--b3-protyle-inline-em-color": "italic",- "--b3-protyle-inline-s-color": "strike",- "--b3-protyle-inline-link-color": "Link",- "--b3-protyle-inline-mark-background": "Mark Background",- "--b3-protyle-inline-mark-color": "Mark",- "--b3-protyle-inline-tag-color": "Tag",- "--b3-protyle-inline-blockref-color": "Block Ref","sync": "Sync","syncNow": "Sync now","waitSync": "The editing data has not been synchronized to the cloud",@@ -762,8 +709,6 @@"blockRef": "Ref Block","theme11": "Use theme in light mode","theme12": "Use theme in dark mode",- "theme13": "Customize the current theme",- "theme14": "After enabling, the customized theme will be used, and after closing, the original theme will be used","theme2": "Select the icons used in the user interface","language1": "Select the display language of the user interface","summary": "Summary",diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.jsonindex 03f1c853ba..9a28b361d6 100644--- a/app/appearance/langs/es_ES.json+++ b/app/appearance/langs/es_ES.json@@ -594,61 +594,8 @@"pasteEmbed": "Pegar bloque incrustado","cut": "Cortar","mentions": "Menciones",- "colorBorder": "Color del borde","colorFont": "Color de la fuente",- "colorGraph": "Color del gráfico",- "colorInline": "Color del documento en línea","colorPrimary": "Color de fondo",- "colorScroll": "Color de desplazamiento",- "colorTab": "Color de la pestaña",- "colorTip": "Color de la información sobre la herramienta",- "--b3-theme-primary": "Primario",- "--b3-theme-primary-light": "Primario - ligero",- "--b3-theme-primary-lighter": "Primario - Poco ligero",- "--b3-theme-primary-lightest": "Primario - Más ligero",- "--b3-theme-secondary": "Secundario",- "--b3-theme-background": "Fondo",- "--b3-theme-surface": "Superficie",- "--b3-theme-error": "Error",- "--b3-theme-on-primary": "Color de la fuente en el primario",- "--b3-theme-on-secondary": "Color de la fuente en el secundario",- "--b3-theme-on-background": "Color de fuente en el fondo",- "--b3-theme-on-surface": "Color de la fuente en la superficie",- "--b3-theme-on-error": "Color de la fuente en caso de error",- "--b3-border-color": "Borde",- "--b3-scroll-color": "Desplazar",- "--b3-list-hover": "Color de la Lista por encima",- "--b3-tab-background": "Fondo de la pestaña",- "--b3-tooltips-color": "Fondo de la información sobre",- "--b3-graph-p-point": "Punto de párrafo",- "--b3-graph-heading-point": "Punto de título",- "--b3-graph-math-point": "Punto de Matemáticas",- "--b3-graph-code-point": "Punto de código",- "--b3-graph-table-point": "Punto de tabla",- "--b3-graph-list-point": "Punto de lista",- "--b3-graph-todo-point": "Punto de lista de tareas",- "--b3-graph-olist-point": "Punto de lista de órdenes",- "--b3-graph-listitem-point": "Punto de la lista de elementos",- "--b3-graph-bq-point": "Punto de la lista de bloques",- "--b3-graph-super-point": "Super punto",- "--b3-graph-doc-point": "Punto de documento",- "--b3-graph-tag-point": "Punto de etiqueta",- "--b3-graph-asset-point": "Punto de Activo",- "--b3-graph-line": "Línea ",- "--b3-graph-ref-line": "Línea entre enlace",- "--b3-graph-tag-line": "Línea entre etiqueta y nodo",- "--b3-graph-tag-tag-line": "Línea entre etiqueta y etiqueta",- "--b3-graph-asset-line": "Línea entre activo y nodo",- "--b3-graph-hl-point": "Elegir punto",- "--b3-graph-hl-line": "Elegir línea",- "--b3-protyle-inline-strong-color": "Negrita",- "--b3-protyle-inline-em-color": "cursiva",- "--b3-protyle-inline-s-color": "strike",- "--b3-protyle-inline-link-color": "Enlace",- "--b3-protyle-inline-mark-background": "Fondo de marca",- "--b3-protyle-inline-mark-color": "Marca",- "--b3-protyle-inline-tag-color": "Etiqueta",- "--b3-protyle-inline-blockref-color": "Bloque Ref","sync": "Sincronización","syncNow": "Sincronizar ahora","waitSync": "Los datos de edición no se han sincronizado con la nube",@@ -763,8 +710,6 @@"blockRef": "Bloque de referencia","theme11": "Usar tema en modo claro","theme12": "Usar tema en modo oscuro",- "theme13": "Personalizar el tema actual",- "theme14": "Después de habilitarlo, se utilizará el tema personalizado, y después de cerrarlo, se utilizará el tema original","theme2": "Selecciona los iconos utilizados en la interfaz de usuario","language1": "Seleccionar el idioma de visualización de la interfaz de usuario","summary": "Resumen",diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.jsonindex e5db150a76..cf4daf82f3 100644--- a/app/appearance/langs/fr_FR.json+++ b/app/appearance/langs/fr_FR.json@@ -592,61 +592,8 @@"pasteEmbed": "Coller Block Intégrer","cut": "Couper","mentions": "Mentions",- "colorBorder": "Couleur de la Bordure","colorFont": "Couleur de la police",- "colorGraph": "Couleur Graph",- "colorInline": "Couleur du document Inline","colorPrimary": "Couleur de fond",- "colorScroll": "Couleur de la barre de défilement",- "colorTab": "Couleur d'onglet",- "colorTip": "Couleur de l'info-bulle",- "--b3-theme-primary": "Couleur principale",- "--b3-theme-primary-light": "Couleur principale - Clair",- "--b3-theme-primary-lighter": "Couleurs principale - plus Claires",- "--b3-theme-primary-lightest": "Couleurs principale - les plus Claires",- "--b3-theme-secondary": "Secondaire",- "--b3-theme-background": "Couleurs de fond",- "--b3-theme-surface": "Surface",- "--b3-theme-error": "Erreur",- "--b3-theme-on-primary": "Couleur de la police sur le primaire",- "--b3-theme-on-secondary": "Couleur de la police sur le secondaire",- "--b3-theme-on-background": "Couleur de la police sur le fond",- "--b3-theme-on-surface": "Couleur de la police sur la surface",- "--b3-theme-on-error": "Couleur de la police en Erreur",- "--b3-border-color": "Bordure",- "--b3-scroll-color": "Barre de défilement",- "--b3-list-hover": "Déplacer le curseur dans la liste",- "--b3-tab-background": "Fond du Ongle",- "--b3-tooltips-color": "Fond de l'info-bulle",- "--b3-graph-p-point": "Point du paragraphe",- "--b3-graph-heading-point": "Point titre",- "--b3-graph-math-point": "Point Math",- "--b3-graph-code-point": "Point code",- "--b3-graph-table-point": "Point table",- "--b3-graph-list-point": "Point liste",- "--b3-graph-todo-point": "Point de la liste des tâches",- "--b3-graph-olist-point": "Points dans une liste ordonnée",- "--b3-graph-listitem-point": "Élément de liste Point",- "--b3-graph-bq-point": "Point Blockquote",- "--b3-graph-super-point": "Point Super",- "--b3-graph-doc-point": "Point Document",- "--b3-graph-tag-point": "Point Tag",- "--b3-graph-asset-point": "Point Asset",- "--b3-graph-line": "Ligne",- "--b3-graph-ref-line": "Ligne entre le lien",- "--b3-graph-tag-line": "Ligne entre le tag et le node",- "--b3-graph-tag-tag-line": "Ligne entre Tag et Tag",- "--b3-graph-asset-line": "Ligne entre asset et le node",- "--b3-graph-hl-point": "Choisir le point",- "--b3-graph-hl-line": "Choisir la ligne",- "--b3-protyle-inline-strong-color": "Gras",- "--b3-protyle-inline-em-color": "italique",- "--b3-protyle-inline-s-color": "grève",- "--b3-protyle-inline-link-color": "Lien",- "--b3-protyle-inline-mark-background": "Couleur de fond du Marqueur",- "--b3-protyle-inline-mark-color": "Marqueur",- "--b3-protyle-inline-tag-color": "Tag",- "--b3-protyle-inline-blockref-color": "Ref Bloc","sync": "Synchro","syncNow": "Synchro maintenant","waitSync": "Les données d'édition n'ont pas été synchronisées avec le cloud",@@ -761,8 +708,6 @@"blockRef": "Bloc Réf","theme11": "Utiliser le thème en mode Clair","theme12": "Utiliser le thème en mode sombre",- "theme13": "Personnaliser le thème actuel",- "theme14": "Le thème personnalisé sera utilisé lorsqu'il sera activé et le thème original sera utilisé lorsqu'il sera désactivé.","theme2": "Sélectionnez les icônes utilisées dans l'interface utilisateur","language1": "Sélectionnez la langue d'affichage de l'interface utilisateur","summary": "Résumé",diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.jsonindex 7ae306d544..215d06f808 100644--- a/app/appearance/langs/zh_CHT.json+++ b/app/appearance/langs/zh_CHT.json@@ -593,61 +593,8 @@"pasteEmbed": "貼上塊嵌入","cut": "剪下","mentions": "提及",- "colorBorder": "線條顏色","colorFont": "字體顏色",- "colorGraph": "關係圖顏色",- "colorInline": "文檔行級元素顏色","colorPrimary": "背景顏色",- "colorScroll": "捲軸顏色",- "colorTab": "分頁顏色",- "colorTip": "提示顏色",- "--b3-theme-primary": "主色",- "--b3-theme-primary-light": "主色 - 淺",- "--b3-theme-primary-lighter": "主色 - 較淺",- "--b3-theme-primary-lightest": "主色 - 最淺",- "--b3-theme-secondary": "第二色調",- "--b3-theme-background": "背景色",- "--b3-theme-surface": "第二背景色",- "--b3-theme-error": "警告色",- "--b3-theme-on-primary": "主色調上的文字",- "--b3-theme-on-secondary": "第二色調上的文字",- "--b3-theme-on-background": "背景色上的文字",- "--b3-theme-on-surface": "第二背景色上的文字",- "--b3-theme-on-error": "警告色上的文字",- "--b3-border-color": "線條",- "--b3-scroll-color": "捲軸",- "--b3-list-hover": "滑鼠移動到清單上",- "--b3-tab-background": "分頁背景",- "--b3-tooltips-color": "提示背景",- "--b3-graph-p-point": "段落的點",- "--b3-graph-heading-point": "標題的點",- "--b3-graph-math-point": "數學公式塊的點",- "--b3-graph-code-point": "代碼塊的點",- "--b3-graph-table-point": "表格的點",- "--b3-graph-list-point": "列表的點",- "--b3-graph-todo-point": "任務列表的點",- "--b3-graph-olist-point": "有序列表的點",- "--b3-graph-listitem-point": "列表項的點",- "--b3-graph-bq-point": "引述的點",- "--b3-graph-super-point": "超級塊的點",- "--b3-graph-doc-point": "文檔的點",- "--b3-graph-tag-point": "標籤的點",- "--b3-graph-asset-point": "資料的點",- "--b3-graph-line": "線",- "--b3-graph-ref-line": "引用塊節點之間的線",- "--b3-graph-tag-line": "標籤和節點之間的線",- "--b3-graph-tag-tag-line": "標籤和標籤之間的線",- "--b3-graph-asset-line": "資料和節點之間的線",- "--b3-graph-hl-point": "選中的點",- "--b3-graph-hl-line": "選中的線",- "--b3-protyle-inline-strong-color": "粗體",- "--b3-protyle-inline-em-color": "斜體",- "--b3-protyle-inline-s-color": "刪除線",- "--b3-protyle-inline-link-color": "連結",- "--b3-protyle-inline-mark-background": "標記背景色",- "--b3-protyle-inline-mark-color": "標記",- "--b3-protyle-inline-tag-color": "標籤",- "--b3-protyle-inline-blockref-color": "引用塊","sync": "同步","syncNow": "立即同步","waitSync": "編輯數據尚未同步到雲端",@@ -762,8 +709,6 @@"blockRef": "引用塊","theme11": "淺色模式下使用主題","theme12": "深色模式下使用主題",- "theme13": "自訂當前主題",- "theme14": "啟用後會使用自訂後的主題,關閉後將使用原有主題","theme2": "選擇外觀使用的圖示","language1": "選擇外觀的顯示語言","summary": "摘要",diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.jsonindex 110285058b..1026a3b58d 100644--- a/app/appearance/langs/zh_CN.json+++ b/app/appearance/langs/zh_CN.json@@ -593,61 +593,8 @@"pasteEmbed": "粘贴块嵌入","cut": "剪切","mentions": "提及",- "colorBorder": "线条颜色","colorFont": "字体颜色",- "colorGraph": "关系图颜色",- "colorInline": "文档行级元素颜色","colorPrimary": "背景颜色",- "colorScroll": "滚动条颜色",- "colorTab": "页签颜色",- "colorTip": "提示颜色",- "--b3-theme-primary": "主色",- "--b3-theme-primary-light": "主色 - 浅",- "--b3-theme-primary-lighter": "主色 - 较浅",- "--b3-theme-primary-lightest": "主色 - 最浅",- "--b3-theme-secondary": "第二色调",- "--b3-theme-background": "背景色",- "--b3-theme-surface": "第二背景色",- "--b3-theme-error": "警告色",- "--b3-theme-on-primary": "主色调上的文本",- "--b3-theme-on-secondary": "第二色调上的文本",- "--b3-theme-on-background": "背景色上的文本",- "--b3-theme-on-surface": "第二背景色上的文本",- "--b3-theme-on-error": "警告色上的文本",- "--b3-border-color": "线条",- "--b3-scroll-color": "滚动条",- "--b3-list-hover": "鼠标移动到列表上",- "--b3-tab-background": "页签背景",- "--b3-tooltips-color": "提示背景",- "--b3-graph-p-point": "段落的点",- "--b3-graph-heading-point": "标题的点",- "--b3-graph-math-point": "数学公式块的点",- "--b3-graph-code-point": "代码块的点",- "--b3-graph-table-point": "表格的点",- "--b3-graph-list-point": "列表的点",- "--b3-graph-todo-point": "任务列表的点",- "--b3-graph-olist-point": "有序列表的点",- "--b3-graph-listitem-point": "列表项的点",- "--b3-graph-bq-point": "引述的点",- "--b3-graph-super-point": "超级块的点",- "--b3-graph-doc-point": "文档的点",- "--b3-graph-tag-point": "标签的点",- "--b3-graph-asset-point": "资源的点",- "--b3-graph-line": "线",- "--b3-graph-ref-line": "引用块节点之间的线",- "--b3-graph-tag-line": "标签和节点之间的线",- "--b3-graph-tag-tag-line": "标签和标签之间的线",- "--b3-graph-asset-line": "资源和节点之间的线",- "--b3-graph-hl-point": "选中的点",- "--b3-graph-hl-line": "选中的线",- "--b3-protyle-inline-strong-color": "粗体",- "--b3-protyle-inline-em-color": "斜体",- "--b3-protyle-inline-s-color": "删除线",- "--b3-protyle-inline-link-color": "链接",- "--b3-protyle-inline-mark-background": "标记背景色",- "--b3-protyle-inline-mark-color": "标记",- "--b3-protyle-inline-tag-color": "标签",- "--b3-protyle-inline-blockref-color": "引用块","sync": "同步","syncNow": "立即同步","waitSync": "编辑数据尚未同步到云端",@@ -762,8 +709,6 @@"blockRef": "引用块","theme11": "明亮模式下使用主题","theme12": "暗黑模式下使用主题",- "theme13": "自定义当前主题",- "theme14": "启用后会使用自定义后的主题,关闭后将使用原有主题","theme2": "选择外观使用的图标","language1": "选择外观的显示语言","summary": "摘要",diff --git a/app/package.json b/app/package.jsonindex 6bfd5339e0..d3a6a686c7 100644--- a/app/package.json+++ b/app/package.json@@ -46,7 +46,6 @@}],"devDependencies": {- "@simonwep/pickr": "^1.8.2","@types/node": "^18.13.0","@typescript-eslint/eslint-plugin": "^5.30.6","@typescript-eslint/parser": "^5.30.6",diff --git a/app/pnpm-lock.yaml b/app/pnpm-lock.yamlindex 7073602af4..65965e9ae1 100644--- a/app/pnpm-lock.yaml+++ b/app/pnpm-lock.yaml@@ -2,7 +2,6 @@ lockfileVersion: 5.4specifiers:'@electron/remote': ^2.0.9- '@simonwep/pickr': ^1.8.2'@types/node': ^18.13.0'@typescript-eslint/eslint-plugin': ^5.30.6'@typescript-eslint/parser': ^5.30.6@@ -36,7 +35,6 @@ dependencies:electron-fetch: 1.7.4devDependencies:- '@simonwep/pickr': 1.8.2'@types/node': 18.13.0'@typescript-eslint/eslint-plugin': 5.30.6_2vt5mtrqleafs33qg2bhpmbaqm'@typescript-eslint/parser': 5.30.6_4x5o4skxv6sl53vpwefgt23khm@@ -434,13 +432,6 @@ packages:resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==}dev: true- /@simonwep/pickr/1.8.2:- resolution: {integrity: sha512-/l5w8BIkrpP6n1xsetx9MWPWlU6OblN5YgZZphxan0Tq4BByTCETL6lyIeY8lagalS2Nbt4F2W034KHLIiunKA==}- dependencies:- core-js: 3.23.4- nanopop: 2.1.0- dev: true-/@sindresorhus/is/0.14.0:resolution: {integrity: sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==}engines: {node: '>=6'}@@ -1348,11 +1339,6 @@ packages:proto-list: 1.2.4optional: true- /core-js/3.23.4:- resolution: {integrity: sha512-vjsKqRc1RyAJC3Ye2kYqgfdThb3zYnx9CrqoCcjMOENMtQPC7ZViBvlDxwYU/2z2NI/IPuiXw5mT4hWhddqjzQ==}- requiresBuild: true- dev: true-/core-util-is/1.0.2:resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==}requiresBuild: true@@ -2820,10 +2806,6 @@ packages:hasBin: truedev: true- /nanopop/2.1.0:- resolution: {integrity: sha512-jGTwpFRexSH+fxappnGQtN9dspgE2ipa1aOjtR24igG0pv6JCxImIAmrLRHX+zUF5+1wtsFVbKyfP51kIGAVNw==}- dev: true-/natural-compare/1.4.0:resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}dev: truediff --git a/app/src/assets/scss/base.scss b/app/src/assets/scss/base.scssindex 2ffd2bd219..aa0d78c9c0 100644--- a/app/src/assets/scss/base.scss+++ b/app/src/assets/scss/base.scss@@ -11,7 +11,6 @@@import "component/button";@import "component/snackbar";@import "component/form";-@import "node_modules/@simonwep/pickr/src/scss/themes/nano.scss";@import "component/text-field";@import "component/select";@import "component/list";diff --git a/app/src/config/appearance.ts b/app/src/config/appearance.tsindex 4fcaaa8d6e..463f094752 100644--- a/app/src/config/appearance.ts+++ b/app/src/config/appearance.ts@@ -8,7 +8,6 @@ import {isBrowser} from "../util/functions";import {fetchPost} from "../util/fetch";import {genOptions} from "../util/genOptions";import {openSnippets} from "./util/snippets";-import {openColorPicker} from "./util/colorPicker";import {loadAssets} from "../util/assets";import {resetFloatDockSize} from "../layout/dock/util";@@ -127,22 +126,6 @@ export const appearance = {<svg><use xlink:href="#iconSettings"></use></svg>${window.siyuan.languages.config}</button></label>-<label class="b3-label fn__flex config__item">- <div class="fn__flex-1 fn__flex-center">- ${window.siyuan.languages.theme13}- </div>- <span class="fn__space"></span>- <button class="b3-button b3-button--outline fn__size200" id="appearanceCustomSetting">- <svg><use xlink:href="#iconFormat"></use></svg>${window.siyuan.languages.custom}- </button>-</label>-<label class="b3-label fn__flex">- <div class="fn__flex-1 fn__flex-center">- ${window.siyuan.languages.theme14}- </div>- <span class="fn__space"></span>- <input class="b3-switch fn__flex-center" id="appearanceCustom" type="checkbox"${window.siyuan.config.appearance.customCSS ? " checked" : ""}>-</label><label class="fn__flex b3-label"><div class="fn__flex-1">${window.siyuan.languages.appearance14}@@ -184,7 +167,6 @@ export const appearance = {lightThemes: window.siyuan.config.appearance.lightThemes,icons: window.siyuan.config.appearance.icons,lang: (appearance.element.querySelector("#lang") as HTMLSelectElement).value,- customCSS: (appearance.element.querySelector("#appearanceCustom") as HTMLInputElement).checked,closeButtonBehavior: (appearance.element.querySelector("#closeButtonBehavior") as HTMLInputElement).checked ? 1 : 0,nativeEmoji: (appearance.element.querySelector("#nativeEmoji") as HTMLInputElement).checked,hideStatusBar: (appearance.element.querySelector("#hideStatusBar") as HTMLInputElement).checked,@@ -219,9 +201,6 @@ export const appearance = {appearance.element.querySelector("#codeSnippet").addEventListener("click", () => {openSnippets();});- appearance.element.querySelector("#appearanceCustomSetting").addEventListener("click", () => {- openColorPicker();- });appearance.element.querySelector("#resetLayout").addEventListener("click", () => {resetLayout();});diff --git a/app/src/config/search.ts b/app/src/config/search.tsindex 29c69f9b50..fa4078368b 100644--- a/app/src/config/search.ts+++ b/app/src/config/search.ts@@ -47,7 +47,7 @@ export const initConfigSearch = (element: HTMLElement) => {"appearance5", "appearance6", "appearance8", "appearance9", "appearance10", "appearance11","appearance14", "appearance15", "appearance16", "appearance17","resetLayout", "reset", "icon", "themeLight", "themeDark", "close", "themeOS", "theme",- "theme2", "theme11", "theme12", "theme13", "theme14", "customEmoji", "customEmojiTip", "refresh"])),+ "theme2", "theme11", "theme12", "customEmoji", "customEmojiTip", "refresh"])),// 集市getLang(["bazaar", "theme", "template", "icon", "widget"]),diff --git a/app/src/config/util/colorPicker.ts b/app/src/config/util/colorPicker.tsdeleted file mode 100644index c30d76d967..0000000000--- a/app/src/config/util/colorPicker.ts+++ /dev/null@@ -1,72 +0,0 @@-import {fetchPost} from "../../util/fetch";-import {Dialog} from "../../dialog";-import * as Pickr from "@simonwep/pickr";--export const openColorPicker = () => {- const theme = window.siyuan.config.appearance.mode === 0 ? window.siyuan.config.appearance.themeLight : window.siyuan.config.appearance.themeDark;- fetchPost("/api/setting/getCustomCSS", {- theme- }, response => {- let customHTML = '<div class="fn__hr"></div>';- Object.keys(response.data).forEach((item) => {- customHTML += `<div class="fn__hr"></div><div>${window.siyuan.languages[item]}</div><div class="fn__hr"></div>`;- Object.keys(response.data[item]).forEach(subItem => {- customHTML += `<div class="fn__flex">- <span class="colorPicker" data-key="${item}" data-subkey="${subItem}" data-value="${response.data[item][subItem]}"></span>- <span class="fn__space"></span>- <span class="ft__on-surface fn__flex-center">${window.siyuan.languages[subItem]}</span>-</div><div class="fn__hr"></div>`;- });- });- const dialog = new Dialog({- width: "70vw",- title: `${window.siyuan.languages.theme13} <b>${theme}</b>`,- content: `<div class="b3-dialog__content" style="height: 60vh;overflow: auto" id="appearanceCustomPanel">${customHTML}</div>- <div class="b3-dialog__action">- <button class="b3-button b3-button--cancel">${window.siyuan.languages.cancel}</button><div class="fn__space"></div>- <button class="b3-button b3-button--text">${window.siyuan.languages.confirm}</button>-</div>`- });- const pickrs: Record<string, Record<string, any>> = {};- dialog.element.querySelectorAll(".colorPicker").forEach((item: HTMLInputElement) => {- // @ts-ignore- const pickr = Pickr.create({- container: "#appearanceCustomPanel",- el: item,- theme: "nano",- default: item.getAttribute("data-value"),- comparison: false,- components: {- preview: true,- opacity: true,- hue: true,- interaction: {- input: true,- }- }- });- const key = item.getAttribute("data-key");- if (!pickrs[key]) {- pickrs[key] = {};- }- pickrs[key][item.getAttribute("data-subkey")] = pickr;- });- dialog.element.querySelector(".b3-button--cancel").addEventListener("click", () => {- dialog.destroy();- });- dialog.element.querySelector(".b3-button--text").addEventListener("click", () => {- const css: Record<string, Record<string, string>> = {};- Object.keys(pickrs).forEach((item) => {- css[item] = {};- Object.keys(pickrs[item]).forEach(subItem => {- css[item][subItem] = pickrs[item][subItem].getColor().toRGBA().toString(0);- });- });- fetchPost("/api/setting/setCustomCSS", {- theme,- css- });- dialog.destroy();- });- });-};diff --git a/app/src/index.ts b/app/src/index.tsindex 093b7c4604..0349f0feca 100644--- a/app/src/index.ts+++ b/app/src/index.ts@@ -112,9 +112,6 @@ class App {progressBackgroundTask(data.data.tasks);break;case "refreshtheme":- if (!window.siyuan.config.appearance.customCSS && data.data.theme.indexOf("custom.css") > -1) {- return;- }if ((window.siyuan.config.appearance.mode === 1 && window.siyuan.config.appearance.themeDark !== "midnight") || (window.siyuan.config.appearance.mode === 0 && window.siyuan.config.appearance.themeLight !== "daylight")) {(document.getElementById("themeStyle") as HTMLLinkElement).href = data.data.theme;} else {diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.tsindex e0dfb3baf6..609f1d582d 100644--- a/app/src/protyle/export/index.ts+++ b/app/src/protyle/export/index.ts@@ -76,7 +76,7 @@ const renderPDF = (id: string) => {const isDefault = (window.siyuan.config.appearance.mode === 1 && window.siyuan.config.appearance.themeDark === "midnight") || (window.siyuan.config.appearance.mode === 0 && window.siyuan.config.appearance.themeLight === "daylight");let themeStyle = "";if (!isDefault) {- themeStyle = `<link rel="stylesheet" type="text/css" id="themeStyle" href="${servePath}/appearance/themes/${window.siyuan.config.appearance.themeLight}/${window.siyuan.config.appearance.customCSS ? "custom" : "theme"}.css?${Constants.SIYUAN_VERSION}"/>`;+ themeStyle = `<link rel="stylesheet" type="text/css" id="themeStyle" href="${servePath}/appearance/themes/${window.siyuan.config.appearance.themeLight}/theme.css?${Constants.SIYUAN_VERSION}"/>`;}// data-theme-mode="light" https://github.com/siyuan-note/siyuan/issues/7379const html = `<!DOCTYPE html>@@ -89,7 +89,7 @@ const renderPDF = (id: string) => {<meta name="mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-status-bar-style" content="black"><link rel="stylesheet" type="text/css" id="baseStyle" href="${servePath}/stage/build/export/base.css?${Constants.SIYUAN_VERSION}"/>- <link rel="stylesheet" type="text/css" id="themeDefaultStyle" href="${servePath}/appearance/themes/daylight/${(window.siyuan.config.appearance.customCSS && isDefault) ? "custom" : "theme"}.css?${Constants.SIYUAN_VERSION}"/>+ <link rel="stylesheet" type="text/css" id="themeDefaultStyle" href="${servePath}/appearance/themes/daylight/theme.css?${Constants.SIYUAN_VERSION}"/>${themeStyle}<title>${window.siyuan.languages.export} PDF</title><style>@@ -594,7 +594,7 @@ const onExport = (data: IWebSocketData, filePath: string, type: string, removeAsconst isDefault = (window.siyuan.config.appearance.mode === 1 && window.siyuan.config.appearance.themeDark === "midnight") || (window.siyuan.config.appearance.mode === 0 && window.siyuan.config.appearance.themeLight === "daylight");let themeStyle = "";if (!isDefault) {- themeStyle = `<link rel="stylesheet" type="text/css" id="themeStyle" href="appearance/themes/${themeName}/${window.siyuan.config.appearance.customCSS ? "custom" : "theme"}.css?${Constants.SIYUAN_VERSION}"/>`;+ themeStyle = `<link rel="stylesheet" type="text/css" id="themeStyle" href="appearance/themes/${themeName}/theme.css?${Constants.SIYUAN_VERSION}"/>`;}const html = `<!DOCTYPE html><html lang="${window.siyuan.config.appearance.lang}" data-theme-mode="${getThemeMode()}" data-light-theme="${window.siyuan.config.appearance.themeLight}" data-dark-theme="${window.siyuan.config.appearance.themeDark}">@@ -606,7 +606,7 @@ const onExport = (data: IWebSocketData, filePath: string, type: string, removeAs<meta name="mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-status-bar-style" content="black"><link rel="stylesheet" type="text/css" id="baseStyle" href="stage/build/export/base.css?${Constants.SIYUAN_VERSION}"/>- <link rel="stylesheet" type="text/css" id="themeDefaultStyle" href="appearance/themes/${themeName}/${(window.siyuan.config.appearance.customCSS && isDefault) ? "custom" : "theme"}.css?${Constants.SIYUAN_VERSION}"/>+ <link rel="stylesheet" type="text/css" id="themeDefaultStyle" href="appearance/themes/${themeName}/theme.css?${Constants.SIYUAN_VERSION}"/>${themeStyle}<title>${pathPosix().basename(filePath)} - ${window.siyuan.languages.siyuanNote} v${Constants.SIYUAN_VERSION}</title><style>diff --git a/app/src/protyle/toolbar/Font.ts b/app/src/protyle/toolbar/Font.tsindex db225fefe3..5e67d5d4a3 100644--- a/app/src/protyle/toolbar/Font.ts+++ b/app/src/protyle/toolbar/Font.ts@@ -96,7 +96,7 @@ const fontMenu = (protyle: IProtyle) => {${colorHTML}</div><div class="fn__hr"></div>-<div>${window.siyuan.languages["--b3-theme-background"]}</div>+<div>${window.siyuan.languages.colorPrimary}</div><div class="fn__hr--small"></div><div class="fn__flex">${bgHTML}diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.tsindex 9e64d9802a..3c88757557 100644--- a/app/src/types/index.d.ts+++ b/app/src/types/index.d.ts@@ -370,7 +370,6 @@ declare interface IAppearance {modeOS: boolean,hideStatusBar: boolean,nativeEmoji: boolean,- customCSS: boolean,themeJS: boolean,mode: number, // 1 暗黑;0 明亮icon: string,diff --git a/app/src/util/assets.ts b/app/src/util/assets.tsindex 39ee16c86b..b6957d68fb 100644--- a/app/src/util/assets.ts+++ b/app/src/util/assets.ts@@ -37,7 +37,7 @@ export const loadAssets = (data: IAppearance) => {}const defaultStyleElement = document.getElementById("themeDefaultStyle");- let defaultThemeAddress = `/appearance/themes/${data.mode === 1 ? "midnight" : "daylight"}/${data.customCSS ? "custom" : "theme"}.css?v=${data.customCSS ? new Date().getTime() : Constants.SIYUAN_VERSION}`;+ let defaultThemeAddress = `/appearance/themes/${data.mode === 1 ? "midnight" : "daylight"}/theme.css?v=${Constants.SIYUAN_VERSION}`;if ((data.mode === 1 && data.themeDark !== "midnight") || (data.mode === 0 && data.themeLight !== "daylight")) {defaultThemeAddress = `/appearance/themes/${data.mode === 1 ? "midnight" : "daylight"}/theme.css?v=${Constants.SIYUAN_VERSION}`;}@@ -51,7 +51,7 @@ export const loadAssets = (data: IAppearance) => {}const styleElement = document.getElementById("themeStyle");if ((data.mode === 1 && data.themeDark !== "midnight") || (data.mode === 0 && data.themeLight !== "daylight")) {- const themeAddress = `/appearance/themes/${data.mode === 1 ? data.themeDark : data.themeLight}/${data.customCSS ? "custom" : "theme"}.css?v=${data.customCSS ? new Date().getTime() : data.themeVer}`;+ const themeAddress = `/appearance/themes/${data.mode === 1 ? data.themeDark : data.themeLight}/theme.css?v=${data.themeVer}`;if (styleElement) {if (!styleElement.getAttribute("href").startsWith(themeAddress)) {styleElement.remove();diff --git a/app/src/window/index.ts b/app/src/window/index.tsindex 312e4e8022..809a1f3247 100644--- a/app/src/window/index.ts+++ b/app/src/window/index.ts@@ -100,9 +100,6 @@ class App {progressBackgroundTask(data.data.tasks);break;case "refreshtheme":- if (!window.siyuan.config.appearance.customCSS && data.data.theme.indexOf("custom.css") > -1) {- return;- }if ((window.siyuan.config.appearance.mode === 1 && window.siyuan.config.appearance.themeDark !== "midnight") || (window.siyuan.config.appearance.mode === 0 && window.siyuan.config.appearance.themeLight !== "daylight")) {(document.getElementById("themeStyle") as HTMLLinkElement).href = data.data.theme;} else {