Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/13650

Vanessa1e2b498bf4c2
diff --git a/app/src/assets/scss/component/_button.scss b/app/src/assets/scss/component/_button.scss
index 73d4e5d1d7..557b9c312b 100644
--- a/app/src/assets/scss/component/_button.scss
+++ b/app/src/assets/scss/component/_button.scss
@@ -49,11 +49,6 @@
}
}
- &--small {
- padding: 0 4px;
- font-size: 12px;
- }
-
&--mid {
padding: 2px 8px;
}
@@ -164,6 +159,11 @@
background-color: var(--b3-card-success-background);
}
+ &--small {
+ padding: 0 4px;
+ font-size: 12px;
+ }
+
&:disabled {
opacity: .38;
cursor: not-allowed;
diff --git a/app/src/protyle/ui/initUI.ts b/app/src/protyle/ui/initUI.ts
index bd31b99872..cacfb08355 100644
--- a/app/src/protyle/ui/initUI.ts
+++ b/app/src/protyle/ui/initUI.ts
@@ -80,7 +80,7 @@ export const initUI = (protyle: IProtyle) => {
setInlineStyle();
clearTimeout(wheelTimeout);
showMessage(`${window.siyuan.languages.fontSize} ${window.siyuan.config.editor.fontSize}px<span class="fn__space"></span>
-<button class="b3-button b3-button--small b3-button--white">${window.siyuan.languages.reset} 16px</button>`, undefined, undefined, wheelId);
+<button class="b3-button b3-button--white">${window.siyuan.languages.reset} 16px</button>`, undefined, undefined, wheelId);
wheelTimeout = window.setTimeout(() => {
fetchPost("/api/setting/setEditor", window.siyuan.config.editor);
protyle.wysiwyg.element.querySelectorAll(".code-block .protyle-linenumber__rows").forEach((block: HTMLElement) => {
diff --git a/app/src/util/processMessage.ts b/app/src/util/processMessage.ts
index 6093d553f6..111cabd3f8 100644
--- a/app/src/util/processMessage.ts
+++ b/app/src/util/processMessage.ts
@@ -4,10 +4,16 @@ import {exportLayout} from "../layout/util";
import {hideMessage, showMessage} from "../dialog/message";
import {setStorageVal} from "../protyle/util/compatibility";
import {Constants} from "../constants";
+import {fetchPost} from "./fetch";
export const processMessage = (response: IWebSocketData) => {
if ("msg" === response.cmd) {
showMessage(response.msg, response.data.closeTimeout, response.code === 0 ? "info" : "error", response.data.id);
+ document.querySelector("#message #addMicrosoftDefenderExclusion")?.addEventListener("click", (event) => {
+ fetchPost("/api/system/addMicrosoftDefenderExclusion", {}, (response) => {
+ (event.target as HTMLElement).innerHTML = '<svg class="fn__rotate" style="margin-right: 0;"><use xlink:href="#iconRefresh"></use></svg>';
+ });
+ }, {once: true});
return false;
}
if ("cmsg" === response.cmd) {