An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:iphone: export
Vanessa55558d0a77f2
diff --git a/app/src/protyle/export/util.ts b/app/src/protyle/export/util.tsindex 35bd648d91..bdc9adefe8 100644--- a/app/src/protyle/export/util.ts+++ b/app/src/protyle/export/util.ts@@ -1,3 +1,8 @@+/// #if !BROWSER+import {escapeHtml} from "../../util/escape";+import {shell} from "electron";+import * as path from "path";+/// #endifimport {hideMessage, showMessage} from "../../dialog/message";import {fetchPost} from "../../util/fetch";import {Dialog} from "../../dialog";@@ -13,12 +18,10 @@ import {chartRender} from "../markdown/chartRender";import {mindmapRender} from "../markdown/mindmapRender";import {abcRender} from "../markdown/abcRender";import {plantumlRender} from "../markdown/plantumlRender";-/// #if !BROWSER-import {escapeHtml} from "../../util/escape";-import {shell} from "electron";-import * as path from "path";+declare const html2canvas: (element: Element) => Promise<any>;export const afterExport = (exportPath: string, msgId: string) => {+ /// #if !BROWSERshowMessage(`${window.siyuan.languages.exported}${escapeHtml(exportPath)}<div class="fn__space"></div><button class="b3-button b3-button--white">${window.siyuan.languages.showInFolder}</button>`, 6000, "info", msgId);@@ -26,20 +29,15 @@ export const afterExport = (exportPath: string, msgId: string) => {shell.showItemInFolder(path.join(exportPath));hideMessage(msgId);});+ /// #endif};-/// #endif--declare const html2canvas: (element: Element) => Promise<any>;export const exportImage = (id: string) => {const exportDialog = new Dialog({title: window.siyuan.languages.exportAsImage,- content: `<div class="b3-dialog__content" style="max-height: 70vh;overflow: auto">- <div style="padding: 48px;- border: 1px solid var(--b3-border-color);- border-radius: 10px;- margin: 8px 0 24px;" class="protyle-wysiwyg${window.siyuan.config.editor.displayBookmarkIcon ? " protyle-wysiwyg--attr" : ""}" id="preview">- <div class="fn__loading" style="left:0"><img height="48px" width="48px" src="stage/loading-pure.svg"></div>+ content: `<div class="b3-dialog__content" style="max-height: 70vh;overflow: auto;${isMobile()?"padding:8px;":""}">+ <div style="${isMobile()?"padding: 16px;margin: 16px 0":"padding: 48px;margin: 8px 0 24px"};border: 1px solid var(--b3-border-color);border-radius: 10px;" class="protyle-wysiwyg${window.siyuan.config.editor.displayBookmarkIcon ? " protyle-wysiwyg--attr" : ""}" id="preview">+ <div class="fn__loading" style="left:0"><img height="128px" width="128px" src="stage/loading-pure.svg"></div></div><div class="ft__smaller ft__on-surface fn__flex"><img style="height: 18px;margin: 0 8px" src="stage/icon.png">${window.siyuan.languages.exportBySiYuan}</div><div class="fn__hr--b"></div>