Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/9961

Vanessa44060c6e0dda
diff --git a/app/electron/main.js b/app/electron/main.js
index 065397845b..cc07200a97 100644
--- a/app/electron/main.js
+++ b/app/electron/main.js
@@ -870,7 +870,7 @@ app.whenReady().then(() => {
modal: true,
show: true,
width: 1032,
- height: 650,
+ height: 725,
resizable: false,
frame: "darwin" === process.platform,
icon: path.join(appDir, "stage", "icon-large.png"),
diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.ts
index 1d1fe76ec6..915c6fcf27 100644
--- a/app/src/protyle/export/index.ts
+++ b/app/src/protyle/export/index.ts
@@ -13,6 +13,7 @@ import {Dialog} from "../../dialog";
import {pathPosix} from "../../util/pathName";
import {replaceLocalPath} from "../../editor/rename";
import {setStorageVal} from "../util/compatibility";
+import {needSubscribe} from "../../util/needSubscribe";
export const saveExport = (option: IExportOptions) => {
/// #if !BROWSER
@@ -245,6 +246,7 @@ const renderPDF = (id: string) => {
</div>
<span class="fn__hr"></span>
<input id="watermark" class="b3-switch" type="checkbox" ${localData.watermark ? "checked" : ""}>
+ <div style="display:none;font-size: 12px;margin-top: 12px;color: var(--b3-theme-on-surface);">${window.siyuan.languages._kernel[29]}</div>
</label>
<div class="fn__flex">
<div class="fn__flex-1"></div>
@@ -448,7 +450,13 @@ id="preview">
mergeSubdocsElement.addEventListener('change', () => {
refreshPreview();
});
-
+ const watermarkElement = actionElement.querySelector('#watermark');
+ watermarkElement.addEventListener('change', () => {
+ if (watermarkElement.checked && ${needSubscribe("")}) {
+ watermarkElement.nextElementSibling.style.display = "";
+ watermarkElement.checked = false;
+ }
+ });
const refreshPreview = () => {
previewElement.innerHTML = '<div class="fn__loading" style="left:0"><img width="48px" src="${servePath}/stage/loading-pure.svg"></div>'
fetchPost("/api/export/exportPreviewHTML", {
@@ -520,7 +528,7 @@ id="preview">
},
keepFold: keepFoldElement.checked,
mergeSubdocs: mergeSubdocsElement.checked,
- watermark: actionElement.querySelector('#watermark').checked,
+ watermark: watermarkElement.checked,
removeAssets: actionElement.querySelector("#removeAssets").checked,
rootId: "${id}",
rootTitle: response.data.name,
diff --git a/app/src/protyle/export/util.ts b/app/src/protyle/export/util.ts
index a8e602a249..fe845d876f 100644
--- a/app/src/protyle/export/util.ts
+++ b/app/src/protyle/export/util.ts
@@ -29,11 +29,9 @@ export const exportImage = (id: string) => {
const exportDialog = new Dialog({
title: window.siyuan.languages.exportAsImage,
content: `<div class="b3-dialog__content" style="${isMobile() ? "padding:8px;" : ""};background-color: var(--b3-theme-background)">
- <div style="${isMobile() ? "padding: 16px;margin: 16px 0" : "padding: 48px;margin: 8px 0 24px"};border: 1px solid var(--b3-border-color);border-radius: var(--b3-border-radius-b);"
+ <div style="${isMobile() ? "padding: 16px;margin: 8px 0" : "padding: 48px;margin: 8px 0"};border: 1px solid var(--b3-border-color);border-radius: var(--b3-border-radius-b);"
class="export-img protyle-wysiwyg${window.siyuan.config.editor.displayBookmarkIcon ? " protyle-wysiwyg--attr" : ""}"
id="preview"></div>
- <div class="fn__hr--b"></div>
- <div class="fn__hr--b"></div>
</div>
<div class="b3-dialog__action">
<label class="fn__flex">