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: Support export and import settings https://github.com/siyuan-note/siyuan/issues/10617
Daniel77eb65087c9b
diff --git a/app/src/config/exportConfig.ts b/app/src/config/exportConfig.tsindex 7a749ff1be..2ec13bb22c 100644--- a/app/src/config/exportConfig.ts+++ b/app/src/config/exportConfig.ts@@ -9,6 +9,8 @@ import {showMessage} from "../dialog/message";import {showFileInFolder} from "../util/pathName";import {Constants} from "../constants";import {openByMobile} from "../protyle/util/compatibility";+import {exportLayout} from "../layout/util";+import {exitSiYuan} from "../dialog/processSystem";export const exportConfig = {element: undefined as Element,@@ -234,7 +236,18 @@ export const exportConfig = {item.addEventListener("change", (event: InputEvent & { target: HTMLInputElement }) => {const formData = new FormData();formData.append("file", event.target.files[0]);- fetchPost("/api/system/importConf", formData);+ fetchPost("/api/system/importConf", formData, response => {+ if (response.code !== 0) {+ showMessage(response.msg);+ return+ }++ showMessage(window.siyuan.languages.imported);+ exportLayout({+ errorExit: true,+ cb: exitSiYuan+ });+ });});} else {item.addEventListener("change", () => {diff --git a/kernel/api/system.go b/kernel/api/system.goindex d51f980b9c..c136085572 100644--- a/kernel/api/system.go+++ b/kernel/api/system.go@@ -410,7 +410,6 @@ func importConf(c *gin.Context) {}logging.LogInfof("imported conf")- model.Close(false, true, 1)}func getConf(c *gin.Context) {