Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:green_heart:

Vanessa90516de22ec3
diff --git a/app/src/assets/scss/_reset.scss b/app/src/assets/scss/_reset.scss
index e3f76f1232..053260050a 100644
--- a/app/src/assets/scss/_reset.scss
+++ b/app/src/assets/scss/_reset.scss
@@ -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,
diff --git a/app/src/assets/template/app/window.tpl b/app/src/assets/template/app/window.tpl
index e0351fd6a4..4cab69c8f9 100644
--- a/app/src/assets/template/app/window.tpl
+++ b/app/src/assets/template/app/window.tpl
@@ -10,7 +10,7 @@
<style id="editorFontSize" type="text/css"></style>
<style id="editorAttr" type="text/css"></style>
</head>
-<body class="fn__flex-column">
+<body class="fn__flex-column body--window">
<div id="loading" class="b3-dialog b3-dialog--open">
<div class="b3-dialog__scrim" style="background-color: #212224"></div>
<img style="position: absolute;width: 36vh;" src="../../icon.png">
diff --git a/app/src/config/bazaar.ts b/app/src/config/bazaar.ts
index 81f112cb7e..407158cecf 100644
--- a/app/src/config/bazaar.ts
+++ b/app/src/config/bazaar.ts
@@ -397,7 +397,7 @@ export const bazaar = {
} else if (bazaarType === "widgets") {
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");
fetchPost(url, {
repoURL: target.parentElement.getAttribute("data-url"),
diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts
index c3edded504..e443df9a14 100644
--- a/app/src/menus/protyle.ts
+++ b/app/src/menus/protyle.ts
@@ -1439,7 +1439,7 @@ export const setFold = (protyle: IProtyle, nodeElement: Element, isOpen?: boolea
const id = nodeElement.getAttribute("data-node-id");
if (nodeElement.getAttribute("data-type") === "NodeHeading") {
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, [{
action: "unfoldHeading",
id,
diff --git a/app/src/protyle/breadcrumb/action.ts b/app/src/protyle/breadcrumb/action.ts
index 38306a26dc..be86aa4724 100644
--- a/app/src/protyle/breadcrumb/action.ts
+++ b/app/src/protyle/breadcrumb/action.ts
@@ -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");
}
}
diff --git a/app/src/protyle/export/util.ts b/app/src/protyle/export/util.ts
index 15f86e9f7d..1a9bfb4bbd 100644
--- a/app/src/protyle/export/util.ts
+++ b/app/src/protyle/export/util.ts
@@ -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,
diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.ts
index 7d9ab35937..95b42ecbe2 100644
--- a/app/src/protyle/hint/index.ts
+++ b/app/src/protyle/hint/index.ts
@@ -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);
diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.ts
index fbeacf9d21..a009d1b6ff 100644
--- a/app/src/protyle/util/onGet.ts
+++ b/app/src/protyle/util/onGet.ts
@@ -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");
}
diff --git a/app/src/protyle/wysiwyg/renderBacklink.ts b/app/src/protyle/wysiwyg/renderBacklink.ts
index 49a3fe70ce..a79171f52e 100644
--- a/app/src/protyle/wysiwyg/renderBacklink.ts
+++ b/app/src/protyle/wysiwyg/renderBacklink.ts
@@ -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");
}