mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-22 23:14:07 +01:00
💚
This commit is contained in:
parent
3ab32327f3
commit
90516de22e
9 changed files with 23 additions and 9 deletions
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue