mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-19 23:06:09 +01:00
This commit is contained in:
parent
10d5d4f6a1
commit
1e2b498bf4
3 changed files with 12 additions and 6 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue