mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix: webui
This commit is contained in:
@@ -245,6 +245,8 @@ async function onSettingWindowCreated(view: Element) {
|
|||||||
doc: Document = document,
|
doc: Document = document,
|
||||||
inputAttr: any = {}
|
inputAttr: any = {}
|
||||||
) => {
|
) => {
|
||||||
|
type = type.replace(/\./g, "-");//替换操作
|
||||||
|
|
||||||
const hostContainerDom = doc.body.querySelector(
|
const hostContainerDom = doc.body.querySelector(
|
||||||
`#config-ob11-${type}-list`
|
`#config-ob11-${type}-list`
|
||||||
);
|
);
|
||||||
@@ -252,11 +254,11 @@ async function onSettingWindowCreated(view: Element) {
|
|||||||
buildHostListItem(
|
buildHostListItem(
|
||||||
type,
|
type,
|
||||||
"",
|
"",
|
||||||
ob11Config[type.split(".")[0]][type.split(".")[1]].length,
|
ob11Config[type.split("-")[0]][type.split("-")[1]].length,
|
||||||
inputAttr
|
inputAttr
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
ob11Config[type.split(".")[0]][type.split(".")[1]].push("");
|
ob11Config[type.split("-")[0]][type.split("-")[1]].push("");
|
||||||
};
|
};
|
||||||
const initReverseHost = (type: string, doc: Document = document) => {
|
const initReverseHost = (type: string, doc: Document = document) => {
|
||||||
const hostContainerDom = doc.body?.querySelector(
|
const hostContainerDom = doc.body?.querySelector(
|
||||||
@@ -275,7 +277,7 @@ async function onSettingWindowCreated(view: Element) {
|
|||||||
|
|
||||||
initReverseHost("http.postUrls", doc);
|
initReverseHost("http.postUrls", doc);
|
||||||
initReverseHost("reverseWs.urls", doc);
|
initReverseHost("reverseWs.urls", doc);
|
||||||
|
|
||||||
doc
|
doc
|
||||||
.querySelector("#config-ob11-http-postUrls-add")
|
.querySelector("#config-ob11-http-postUrls-add")
|
||||||
?.addEventListener("click", () =>
|
?.addEventListener("click", () =>
|
||||||
@@ -283,7 +285,7 @@ async function onSettingWindowCreated(view: Element) {
|
|||||||
placeholder: "如:http://127.0.0.1:5140/onebot",
|
placeholder: "如:http://127.0.0.1:5140/onebot",
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
doc
|
doc
|
||||||
.querySelector("#config-ob11-reverseWs-urls-add")
|
.querySelector("#config-ob11-reverseWs-urls-add")
|
||||||
?.addEventListener("click", () =>
|
?.addEventListener("click", () =>
|
||||||
|
@@ -357,6 +357,7 @@ async function onSettingWindowCreated(view) {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
const addReverseHost = (type, doc2 = document, inputAttr = {}) => {
|
const addReverseHost = (type, doc2 = document, inputAttr = {}) => {
|
||||||
|
type = type.replace(/\./g, "-");
|
||||||
const hostContainerDom = doc2.body.querySelector(
|
const hostContainerDom = doc2.body.querySelector(
|
||||||
`#config-ob11-${type}-list`
|
`#config-ob11-${type}-list`
|
||||||
);
|
);
|
||||||
@@ -364,11 +365,11 @@ async function onSettingWindowCreated(view) {
|
|||||||
buildHostListItem(
|
buildHostListItem(
|
||||||
type,
|
type,
|
||||||
"",
|
"",
|
||||||
ob11Config[type.split(".")[0]][type.split(".")[1]].length,
|
ob11Config[type.split("-")[0]][type.split("-")[1]].length,
|
||||||
inputAttr
|
inputAttr
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
ob11Config[type.split(".")[0]][type.split(".")[1]].push("");
|
ob11Config[type.split("-")[0]][type.split("-")[1]].push("");
|
||||||
};
|
};
|
||||||
const initReverseHost = (type, doc2 = document) => {
|
const initReverseHost = (type, doc2 = document) => {
|
||||||
const hostContainerDom = doc2.body?.querySelector(
|
const hostContainerDom = doc2.body?.querySelector(
|
||||||
|
Reference in New Issue
Block a user