Merge pull request #477 from LLOneBot/dev

release: 4.0.11
This commit is contained in:
idranme 2024-10-16 11:44:43 +08:00 committed by GitHub
commit 8239e9a243
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 20 additions and 2 deletions

View File

@ -4,7 +4,7 @@
"name": "LLOneBot", "name": "LLOneBot",
"slug": "LLOneBot", "slug": "LLOneBot",
"description": "实现 OneBot 11 和 Satori 协议,用于 QQ 机器人开发", "description": "实现 OneBot 11 和 Satori 协议,用于 QQ 机器人开发",
"version": "4.0.10", "version": "4.0.11",
"icon": "./icon.webp", "icon": "./icon.webp",
"authors": [ "authors": [
{ {

View File

@ -175,6 +175,7 @@ async function onSettingWindowCreated(view: Element) {
'调用 /get_image、/get_record、/get_file 时,没有 url 时添加 Base64 字段', '调用 /get_image、/get_record、/get_file 时,没有 url 时添加 Base64 字段',
SettingSwitch('enableLocalFile2Url', config.enableLocalFile2Url), SettingSwitch('enableLocalFile2Url', config.enableLocalFile2Url),
), ),
SettingItem('', null, SettingButton('保存', 'config-ob11-save-2', 'primary')),
]), ]),
SettingList([ SettingList([
SettingItem( SettingItem(
@ -214,6 +215,7 @@ async function onSettingWindowCreated(view: Element) {
'单位为秒,可用于获取撤回的消息', '单位为秒,可用于获取撤回的消息',
`<div class="q-input"><input class="q-input__inner" data-config-key="msgCacheExpire" type="number" min="1" value="${config.msgCacheExpire}" placeholder="${config.msgCacheExpire}" /></div>`, `<div class="q-input"><input class="q-input__inner" data-config-key="msgCacheExpire" type="number" min="1" value="${config.msgCacheExpire}" placeholder="${config.msgCacheExpire}" /></div>`,
), ),
SettingItem('', null, SettingButton('保存', 'config-ob11-save-3', 'primary')),
]), ]),
SettingList([ SettingList([
SettingItem('GitHub 仓库', `https://github.com/LLOneBot/LLOneBot`, SettingButton('点个星星', 'open-github')), SettingItem('GitHub 仓库', `https://github.com/LLOneBot/LLOneBot`, SettingButton('点个星星', 'open-github')),
@ -392,6 +394,22 @@ async function onSettingWindowCreated(view: Element) {
alert('保存成功') alert('保存成功')
}) })
doc.querySelector('#config-ob11-save-2')?.addEventListener('click', () => {
config.ob11 = ob11Config
window.llonebot.setConfig(false, config)
showError().then()
alert('保存成功')
})
doc.querySelector('#config-ob11-save-3')?.addEventListener('click', () => {
config.ob11 = ob11Config
window.llonebot.setConfig(false, config)
showError().then()
alert('保存成功')
})
doc.body.childNodes.forEach((node) => { doc.body.childNodes.forEach((node) => {
view.appendChild(node) view.appendChild(node)
}) })

View File

@ -1 +1 @@
export const version = '4.0.10' export const version = '4.0.11'