This commit is contained in:
parent
53035e3d80
commit
44060c6e0d
3 changed files with 12 additions and 6 deletions
|
@ -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"),
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Add table
Reference in a new issue