mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-20 07:16:10 +01:00
🎨 Support one-click addition of Microsoft Defender exclusions https://github.com/siyuan-note/siyuan/issues/13650
This commit is contained in:
parent
203dbfa35a
commit
324e6ae8da
14 changed files with 16 additions and 16 deletions
|
|
@ -8,10 +8,11 @@ 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);
|
||||
const id = 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>';
|
||||
(event.target as HTMLElement).innerHTML = '<svg class="fn__rotate" style="margin-right: 0;"><use xlink:href="#iconRefresh"></use></svg>';
|
||||
fetchPost("/api/system/addMicrosoftDefenderExclusion", {}, () => {
|
||||
hideMessage(id);
|
||||
});
|
||||
}, {once: true});
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue