From 063b2460f8ef4e8666d11d0f964a39215bf908cc Mon Sep 17 00:00:00 2001 From: linyuchen Date: Wed, 6 Mar 2024 11:44:02 +0800 Subject: [PATCH] feat: some link on setting ui --- src/renderer/index.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/renderer/index.ts b/src/renderer/index.ts index 6ddf8ff..6190b0a 100644 --- a/src/renderer/index.ts +++ b/src/renderer/index.ts @@ -136,9 +136,36 @@ async function onSettingWindowCreated(view: Element) { SettingButton('打开', 'config-open-log-path'), ), ]), + SettingList([ + SettingItem( + 'GitHub', + `https://github.com/LLOneBot/LLOneBot`, + SettingButton('点个Star', 'open-github'), + ), + SettingItem( + 'Telegram 群', + `https://t.me/+nLZEnpne-pQ1OWFl`, + SettingButton('进去逛逛', 'open-telegram'), + ), + SettingItem( + 'QQ 群', + `545402644`, + SettingButton('我要进去', 'open-qq-group'), + ), + ]), '', ].join(''), "text/html"); + // 外链按钮 + doc.querySelector('#open-github').addEventListener('click', () => { + window.LiteLoader.api.openExternal('https://github.com/LLOneBot/LLOneBot') + }) + doc.querySelector('#open-telegram').addEventListener('click', () => { + window.LiteLoader.api.openExternal('https://t.me/+nLZEnpne-pQ1OWFl') + }) + doc.querySelector('#open-qq-group').addEventListener('click', () => { + window.LiteLoader.api.openExternal('https://qm.qq.com/q/bDnHRG38aI') + }) // 生成反向地址列表 const buildHostListItem = (type: string, host: string, index: number) => { const dom = {