From e59d094feb6e62fb0c70497d2cd58fe5056fbfe0 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: Sat, 7 Sep 2024 10:45:45 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E6=8F=90=E5=8D=87=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/webui/index.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/webui/index.ts b/src/webui/index.ts index c0e660a1..d64f5fe4 100644 --- a/src/webui/index.ts +++ b/src/webui/index.ts @@ -3,6 +3,7 @@ import { ALLRouter } from './src/router'; import { LogWrapper } from '@/common/log'; import { NapCatPathWrapper } from '@/common/path'; import { WebUiConfigWrapper } from './src/helper/config'; +import { RequestUtil } from '@/common/request'; const app = express(); @@ -38,7 +39,23 @@ export async function InitWebUi(logger: LogWrapper, pathWrapper: NapCatPathWrapp app.use(config.prefix + '/api', ALLRouter); app.listen(config.port, config.host, async () => { log(`[NapCat] [WebUi] Current WebUi is running at http://${config.host}:${config.port}${config.prefix}`); - log(`[NapCat] [WebUi] Login URL is http://${config.host}:${config.port}${config.prefix}/webui`); log(`[NapCat] [WebUi] Login Token is ${config.token}`); + log(`[NapCat] [WebUi] WebUi User Panel Url: http://${config.host}:${config.port}${config.prefix}/webui?token=${config.token}`); + log(`[NapCat] [WebUi] WebUi Local Panel Url: http://127.0.0.1:${config.port}${config.prefix}/webui?token=${config.token}`); + //获取上网Ip + //https://www.ip.cn/api/index?ip&type=0 + RequestUtil.HttpGetJson<{ IP: {IP:string} }>( + 'https://ip.011102.xyz/', + 'GET', + {}, + {}, + true, + true + ).then((data) => { + log(`[NapCat] [WebUi] WebUi Publish Panel Url: http://${data.IP.IP}:${config.port}${config.prefix}/webui/?token=${config.token}`); + }).catch((err) => { + logger.logError(`[NapCat] [WebUi] Get Publish Panel Url Error: ${err}`); + }); + }); } From 500b2d0e6d733012e39a55fd38e4b588b4ecccd3 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: Sat, 7 Sep 2024 13:31:32 +0800 Subject: [PATCH 2/3] release: 2.3.6 --- manifest.json | 2 +- package.json | 2 +- src/common/version.ts | 2 +- src/webui/ui/NapCat.ts | 2 +- static/assets/renderer.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/manifest.json b/manifest.json index 8a0849dd..4523cbdb 100644 --- a/manifest.json +++ b/manifest.json @@ -4,7 +4,7 @@ "name": "NapCatQQ", "slug": "NapCat.Framework", "description": "高性能的 OneBot 11 协议实现", - "version": "2.3.5", + "version": "2.3.6", "icon": "./logo.png", "authors": [ { diff --git a/package.json b/package.json index 8c20adc1..70258035 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "napcat", "private": true, "type": "module", - "version": "2.3.5", + "version": "2.3.6", "scripts": { "build:framework": "vite build --mode framework", "build:shell": "vite build --mode shell", diff --git a/src/common/version.ts b/src/common/version.ts index d02f3606..461338cf 100644 --- a/src/common/version.ts +++ b/src/common/version.ts @@ -1 +1 @@ -export const napCatVersion = '2.3.5'; +export const napCatVersion = '2.3.6'; diff --git a/src/webui/ui/NapCat.ts b/src/webui/ui/NapCat.ts index e8c57f9d..3bd7b802 100644 --- a/src/webui/ui/NapCat.ts +++ b/src/webui/ui/NapCat.ts @@ -30,7 +30,7 @@ async function onSettingWindowCreated(view: Element) { SettingItem( 'Napcat', undefined, - SettingButton('V2.3.5', 'napcat-update-button', 'secondary'), + SettingButton('V2.3.6', 'napcat-update-button', 'secondary'), ), ]), SettingList([ diff --git a/static/assets/renderer.js b/static/assets/renderer.js index 7693e3a4..f869c414 100644 --- a/static/assets/renderer.js +++ b/static/assets/renderer.js @@ -164,7 +164,7 @@ async function onSettingWindowCreated(view) { SettingItem( 'Napcat', void 0, - SettingButton("V2.3.5", "napcat-update-button", "secondary") + SettingButton("V2.3.6", "napcat-update-button", "secondary") ) ]), SettingList([ From 4f52128a06f7ebdd6b337dca5238f457e7636af0 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: Sat, 7 Sep 2024 17:17:07 +0800 Subject: [PATCH 3/3] fix --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dd8e2aea..39799c36 100644 --- a/README.md +++ b/README.md @@ -28,10 +28,12 @@ NapCatQQ (aka 猫猫框架) 是现代化的基于 NTQQ 的 Bot 协议端实现 [Telegram Link](https://t.me/+nLZEnpne-pQ1OWFl) ## 猫猫朋友 -感谢 [LLOneBot](https://github.com/LLOneBot/LLOneBot) 提供初始版本基础 +感谢 [LLOneBot](https://github.com/LLOneBot/LLOneBot) 提供部分参考 感谢 [Lagrange](https://github.com/LagrangeDev/Lagrange.Core) 对本项目的大力支持 +不过最最重要的 还是需要感谢屏幕前的你哦~ + --- ## 约法三章