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