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: 导出 PDF 时支持将资源文件作为附件嵌入 https://github.com/siyuan-note/siyuan/issues/7414
Liang Ding15f989f5277e
diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.jsonindex 62500b459a..887d2eec53 100644--- a/app/appearance/langs/en_US.json+++ b/app/appearance/langs/en_US.json@@ -199,9 +199,10 @@"exportPDF1": "Landscape page","exportPDF2": "Page margins","exportPDF3": "Page Scale",- "exportPDF4": "Remove assets directory",+ "exportPDF4": "Embed assets","exportPDF5": "Keep folded",- "exportPDF6": "Merge subdocuments",+ "mergeSubdocs": "Merge subdocuments",+ "removeAssetsFolder": "Remove assets directory","upload": "Upload","reminderTip": "The reminder time cannot be less than the current time","wechatTip": "The content block will be sent to the cloud in clear text, and pushed through the WeChat MP template message when it expires",diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.jsonindex ba8eba908d..a99a523d4d 100644--- a/app/appearance/langs/es_ES.json+++ b/app/appearance/langs/es_ES.json@@ -199,9 +199,10 @@"exportPDF1": "Página apaisada","exportPDF2": "Márgenes de la página","exportPDF3": "Escala de la página",- "exportPDF4": "Eliminar directorio de activos",+ "exportPDF4": "Activos incrustados","exportPDF5": "Mantener doblado",- "exportPDF6": "Fusionar subdocumentos",+ "mergeSubdocs": "Fusionar subdocumentos",+ "removeAssetsFolder": "Eliminar directorio de activos","upload": "Subir","reminderTip": "La hora del recordatorio no puede ser inferior a la hora actual","wechatTip": "El bloque de contenido se enviará a la nube en texto claro, y se empujará a través del mensaje de plantilla de WeChat MP cuando caduque",diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.jsonindex 9ecc80ca4d..d684b5c9e9 100644--- a/app/appearance/langs/fr_FR.json+++ b/app/appearance/langs/fr_FR.json@@ -199,9 +199,10 @@"exportPDF1": "Page paysage","exportPDF2": "Marges de page","exportPDF3": "Échelle de page",- "exportPDF4": "Supprimer le répertoire des actifs",+ "exportPDF4": "Incorporer des ressources","exportPDF5": "Garder plié",- "exportPDF6": "Fusionner les sous-documents",+ "mergeSubdocs": "Fusionner les sous-documents",+ "removeAssetsFolder": "Supprimer le répertoire des actifs","upload": "Télécharger","reminderTip": "The reminder time cannot be less than the current time","wechatTip": "Le bloc de contenu sera envoyé au cloud en texte clair et transmis au message du modèle de compte officiel WeChat à son expiration.",diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.jsonindex 598868c1ba..bcff17a8d6 100644--- a/app/appearance/langs/zh_CHT.json+++ b/app/appearance/langs/zh_CHT.json@@ -199,9 +199,10 @@"exportPDF1": "橫向頁面","exportPDF2": "頁面邊距","exportPDF3": "頁面縮放",- "exportPDF4": "移除 assets 目錄",+ "exportPDF4": "嵌入資源文件","exportPDF5": "保持折疊狀態",- "exportPDF6": "合併子文檔",+ "mergeSubdocs": "合併子文檔",+ "removeAssetsFolder": "移除 assets 目錄","upload": "上傳","reminderTip": "提醒時間不能小於當前時間","wechatTip": "該內容塊將以明文形式發送到雲端,到期時通過微信公眾號模板消息進行推送",diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.jsonindex 5202f15a64..c166b2ee00 100644--- a/app/appearance/langs/zh_CN.json+++ b/app/appearance/langs/zh_CN.json@@ -199,9 +199,10 @@"exportPDF1": "横向页面","exportPDF2": "页面边距","exportPDF3": "页面缩放",- "exportPDF4": "移除 assets 目录",+ "exportPDF4": "嵌入资源文件","exportPDF5": "保持折叠状态",- "exportPDF6": "合并子文档",+ "mergeSubdocs": "合并子文档",+ "removeAssetsFolder": "移除 assets 目录","upload": "上传","reminderTip": "提醒时间不能小于当前时间","wechatTip": "该内容块将以明文形式发送到云端,到期时通过微信公众号模板消息进行推送",diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.tsindex e92cf3c1d1..1bba904687 100644--- a/app/src/protyle/export/index.ts+++ b/app/src/protyle/export/index.ts@@ -1,7 +1,7 @@import {hideMessage, showMessage} from "../../dialog/message";import {Constants} from "../../constants";/// #if !BROWSER-import {OpenDialogReturnValue, ipcRenderer} from "electron";+import {ipcRenderer, OpenDialogReturnValue} from "electron";import {app, BrowserWindow, dialog, getCurrentWindow} from "@electron/remote";import * as fs from "fs";import * as path from "path";@@ -33,14 +33,14 @@ export const saveExport = (option: { type: string, id: string }) => {content: `<div class="b3-dialog__content"><label class="fn__flex b3-label"><div class="fn__flex-1">- ${window.siyuan.languages.exportPDF4}+ ${window.siyuan.languages.removeAssetsFolder}</div><span class="fn__space"></span><input id="removeAssets" class="b3-switch" type="checkbox" ${localData.removeAssets ? "checked" : ""}></label><label class="fn__flex b3-label"><div class="fn__flex-1">- ${window.siyuan.languages.exportPDF6}+ ${window.siyuan.languages.mergeSubdocs}</div><span class="fn__space"></span><input id="mergeSubdocs" class="b3-switch" type="checkbox" ${localData.mergeSubdocs ? "checked" : ""}>@@ -215,7 +215,7 @@ const renderPDF = (id: string) => {</label><label class="b3-label"><div>- ${window.siyuan.languages.exportPDF6}+ ${window.siyuan.languages.mergeSubdocs}</div><span class="fn__hr"></span><input id="mergeSubdocs" class="b3-switch" type="checkbox" ${localData.mergeSubdocs ? "checked" : ""}>