From 69e28eb0003b0b645f0c3ee79f7182cb98efea57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Wed, 8 May 2024 19:43:33 +0800 Subject: [PATCH] feat: qrcode expired try --- src/core | 2 +- src/webui/ui/NapCat.ts | 4 ++-- static/assets/renderer.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core b/src/core index 8cf3b85f..45388bd3 160000 --- a/src/core +++ b/src/core @@ -1 +1 @@ -Subproject commit 8cf3b85ffb49d9cc223d850a2a955b799b841bd7 +Subproject commit 45388bd385eb0090d86a968ca7946ef14484037f diff --git a/src/webui/ui/NapCat.ts b/src/webui/ui/NapCat.ts index e902f9ce..c4e1f448 100644 --- a/src/webui/ui/NapCat.ts +++ b/src/webui/ui/NapCat.ts @@ -242,8 +242,8 @@ async function onSettingWindowCreated(view: Element) { // 开关 doc.querySelectorAll('setting-switch[data-config-key]').forEach((dom: Element) => { dom.addEventListener('click', () => { - const active = dom.getAttribute('is-active') === undefined - //@ts-ignore 等待修复 + const active = dom.getAttribute('is-active') == undefined; + //@ts-ignore 扩展 setOB11Config(dom.dataset.configKey, active) if (active) dom.setAttribute('is-active', '') else dom.removeAttribute('is-active') diff --git a/static/assets/renderer.js b/static/assets/renderer.js index b478d457..a4cdbecd 100644 --- a/static/assets/renderer.js +++ b/static/assets/renderer.js @@ -132,7 +132,7 @@ class WebUiApiOB11ConfigWrapper { "Authorization": "Bearer " + this.retCredential, "Content-Type": "application/json" }, - body: JSON.stringify(config) + body: JSON.stringify({ config: JSON.stringify(config) }) } ); if (ConfigResponse.status == 200) { @@ -353,7 +353,7 @@ async function onSettingWindowCreated(view) { }); doc.querySelectorAll("setting-switch[data-config-key]").forEach((dom) => { dom.addEventListener("click", () => { - const active = dom.getAttribute("is-active") === void 0; + const active = dom.getAttribute("is-active") == void 0; setOB11Config(dom.dataset.configKey, active); if (active) dom.setAttribute("is-active", "");