feat: qrcode expired try

This commit is contained in:
手瓜一十雪 2024-05-08 19:43:33 +08:00
parent e5d3a8360c
commit 69e28eb000
3 changed files with 5 additions and 5 deletions

@ -1 +1 @@
Subproject commit 8cf3b85ffb49d9cc223d850a2a955b799b841bd7
Subproject commit 45388bd385eb0090d86a968ca7946ef14484037f

View File

@ -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')

View File

@ -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", "");