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

@ -46,12 +46,12 @@ export const fullscreen = (element: Element, btnElement?: Element) => {
if (isFullscreen) {
element.classList.remove("fullscreen");
if (document.querySelector("body").classList.contains("body--win32")) {
document.getElementById("drag").classList.remove("fn__hidden");
document.getElementById("drag")?.classList.remove("fn__hidden");
}
} else {
element.classList.add("fullscreen");
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", () => {
btnsElement[0].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;
fetchPost("/api/export/exportPreviewHTML", {
id,

View file

@ -166,7 +166,7 @@ ${unicode2Emoji(emoji.unicode, true)}</button>`;
public genLoading(protyle: IProtyle) {
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");
const textareaPosition = getSelectionPosition(protyle.wysiwyg.element);
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) => {
if ((options.expand && index > 2) || (!options.expand && index > 1)) {
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");
}

View file

@ -43,7 +43,7 @@ const setBacklinkFold = (html: string, expand: boolean) => {
Array.from(tempDom.content.children).forEach((item, index) => {
if ((expand && index > 2) || (!expand && index > 1)) {
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");
}