This commit is contained in:
Vanessa 2023-01-27 10:44:31 +08:00
parent 3ab32327f3
commit 90516de22e
9 changed files with 23 additions and 9 deletions

View file

@ -66,6 +66,20 @@ body {
} }
} }
} }
&.body--window.body--win32 .fullscreen {
& > .protyle-breadcrumb,
& > .block__icons {
padding-right: 126px;
}
}
&.body--window .fullscreen {
& > .protyle-breadcrumb,
& > .block__icons {
height: 42px;
}
}
} }
ul, ul,

View file

@ -10,7 +10,7 @@
<style id="editorFontSize" type="text/css"></style> <style id="editorFontSize" type="text/css"></style>
<style id="editorAttr" type="text/css"></style> <style id="editorAttr" type="text/css"></style>
</head> </head>
<body class="fn__flex-column"> <body class="fn__flex-column body--window">
<div id="loading" class="b3-dialog b3-dialog--open"> <div id="loading" class="b3-dialog b3-dialog--open">
<div class="b3-dialog__scrim" style="background-color: #212224"></div> <div class="b3-dialog__scrim" style="background-color: #212224"></div>
<img style="position: absolute;width: 36vh;" src="../../icon.png"> <img style="position: absolute;width: 36vh;" src="../../icon.png">

View file

@ -397,7 +397,7 @@ export const bazaar = {
} else if (bazaarType === "widgets") { } else if (bazaarType === "widgets") {
url = "/api/bazaar/installBazaarWidget"; url = "/api/bazaar/installBazaarWidget";
} }
target.parentElement.insertAdjacentHTML("afterend", "<img data-type=\"img-loading\" style=\"position: absolute;top: 0;left: 0;height: 100%;width: 100%;padding: 48px;box-sizing: border-box;\" src=\"/stage/loading-pure.svg\">"); target.parentElement.insertAdjacentHTML("afterend", '<img data-type="img-loading" style="position: absolute;top: 0;left: 0;height: 100%;width: 100%;padding: 48px;box-sizing: border-box;" src="/stage/loading-pure.svg">');
const name = target.parentElement.getAttribute("data-name"); const name = target.parentElement.getAttribute("data-name");
fetchPost(url, { fetchPost(url, {
repoURL: target.parentElement.getAttribute("data-url"), repoURL: target.parentElement.getAttribute("data-url"),

View file

@ -1439,7 +1439,7 @@ export const setFold = (protyle: IProtyle, nodeElement: Element, isOpen?: boolea
const id = nodeElement.getAttribute("data-node-id"); const id = nodeElement.getAttribute("data-node-id");
if (nodeElement.getAttribute("data-type") === "NodeHeading") { if (nodeElement.getAttribute("data-type") === "NodeHeading") {
if (fold === "0") { if (fold === "0") {
nodeElement.insertAdjacentHTML("beforeend", "<div spin=\"1\" style=\"text-align: center\"><img width=\"24px\" src=\"/stage/loading-pure.svg\"></div>"); nodeElement.insertAdjacentHTML("beforeend", '<div spin="1" style="text-align: center"><img width="24px" src="/stage/loading-pure.svg"></div>');
transaction(protyle, [{ transaction(protyle, [{
action: "unfoldHeading", action: "unfoldHeading",
id, id,

View file

@ -46,12 +46,12 @@ export const fullscreen = (element: Element, btnElement?: Element) => {
if (isFullscreen) { if (isFullscreen) {
element.classList.remove("fullscreen"); element.classList.remove("fullscreen");
if (document.querySelector("body").classList.contains("body--win32")) { if (document.querySelector("body").classList.contains("body--win32")) {
document.getElementById("drag").classList.remove("fn__hidden"); document.getElementById("drag")?.classList.remove("fn__hidden");
} }
} else { } else {
element.classList.add("fullscreen"); element.classList.add("fullscreen");
if (document.querySelector("body").classList.contains("body--win32")) { if (document.querySelector("body").classList.contains("body--win32")) {
document.getElementById("drag").classList.add("fn__hidden"); document.getElementById("drag")?.classList.add("fn__hidden");
} }
} }

View file

@ -80,7 +80,7 @@ export const exportImage = (id: string) => {
foldElement.addEventListener("change", () => { foldElement.addEventListener("change", () => {
btnsElement[0].setAttribute("disabled", "disabled"); btnsElement[0].setAttribute("disabled", "disabled");
btnsElement[1].setAttribute("disabled", "disabled"); btnsElement[1].setAttribute("disabled", "disabled");
btnsElement[1].parentElement.insertAdjacentHTML("afterend", "<div class=\"fn__loading\"><img height=\"128px\" width=\"128px\" src=\"stage/loading-pure.svg\"></div>"); btnsElement[1].parentElement.insertAdjacentHTML("afterend", '<div class="fn__loading"><img height="128px" width="128px" src="stage/loading-pure.svg"></div>');
window.siyuan.storage[Constants.LOCAL_EXPORTIMG].keepFold = foldElement.checked; window.siyuan.storage[Constants.LOCAL_EXPORTIMG].keepFold = foldElement.checked;
fetchPost("/api/export/exportPreviewHTML", { fetchPost("/api/export/exportPreviewHTML", {
id, id,

View file

@ -166,7 +166,7 @@ ${unicode2Emoji(emoji.unicode, true)}</button>`;
public genLoading(protyle: IProtyle) { public genLoading(protyle: IProtyle) {
if (this.element.classList.contains("fn__none")) { if (this.element.classList.contains("fn__none")) {
this.element.innerHTML = "<div class=\"fn__loading\" style=\"height: 128px;position: initial\"><img width=\"64px\" src=\"/stage/loading-pure.svg\"></div>"; this.element.innerHTML = '<div class="fn__loading" style="height: 128px;position: initial"><img width="64px" src="/stage/loading-pure.svg"></div>';
this.element.classList.remove("fn__none"); this.element.classList.remove("fn__none");
const textareaPosition = getSelectionPosition(protyle.wysiwyg.element); const textareaPosition = getSelectionPosition(protyle.wysiwyg.element);
setPosition(this.element, textareaPosition.left, textareaPosition.top + 26, 30); setPosition(this.element, textareaPosition.left, textareaPosition.top + 26, 30);

View file

@ -194,7 +194,7 @@ const setHTML = (options: {
Array.from(protyle.wysiwyg.element.children).forEach((item, index) => { Array.from(protyle.wysiwyg.element.children).forEach((item, index) => {
if ((options.expand && index > 2) || (!options.expand && index > 1)) { if ((options.expand && index > 2) || (!options.expand && index > 1)) {
if ((options.expand && index === 3) || (!options.expand && index === 2)) { if ((options.expand && index === 3) || (!options.expand && index === 2)) {
item.insertAdjacentHTML("beforebegin", "<div style=\"max-width: 100%;justify-content: center;\" contenteditable=\"false\" class=\"protyle-breadcrumb__item\"><svg><use xlink:href=\"#iconMore\"></use></svg></div>"); item.insertAdjacentHTML("beforebegin", '<div style="max-width: 100%;justify-content: center;" contenteditable="false" class="protyle-breadcrumb__item"><svg><use xlink:href="#iconMore"></use></svg></div>');
} }
item.classList.add("fn__none"); item.classList.add("fn__none");
} }

View file

@ -43,7 +43,7 @@ const setBacklinkFold = (html: string, expand: boolean) => {
Array.from(tempDom.content.children).forEach((item, index) => { Array.from(tempDom.content.children).forEach((item, index) => {
if ((expand && index > 2) || (!expand && index > 1)) { if ((expand && index > 2) || (!expand && index > 1)) {
if ((expand && index === 3) || (!expand && index === 2)) { if ((expand && index === 3) || (!expand && index === 2)) {
item.insertAdjacentHTML("beforebegin", "<div style=\"max-width: 100%;justify-content: center;\" contenteditable=\"false\" class=\"protyle-breadcrumb__item\"><svg><use xlink:href=\"#iconMore\"></use></svg></div>"); item.insertAdjacentHTML("beforebegin", '<div style="max-width: 100%;justify-content: center;" contenteditable="false" class="protyle-breadcrumb__item"><svg><use xlink:href="#iconMore"></use></svg></div>');
} }
item.classList.add("fn__none"); item.classList.add("fn__none");
} }