-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 查看登录QQ信息&获取快速登录列表详细信息&获取nc的包信息&优化了部分写法
- Loading branch information
Showing
11 changed files
with
101 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
import { RequestHandler } from 'express'; | ||
import { WebUiDataRuntime } from '@webapi/helper/Data'; | ||
|
||
import { sendSuccess } from '@webapi/utils/response'; | ||
|
||
// TODO: Implement LogFileListHandler | ||
export const LogFileListHandler: RequestHandler = async (_, res) => { | ||
const fakeData = { | ||
uin: 0, | ||
nick: 'NapCat', | ||
avatar: 'https://q1.qlogo.cn/g?b=qq&nk=0&s=640', | ||
status: 'online', | ||
boottime: Date.now(), | ||
}; | ||
sendSuccess(res, fakeData); | ||
export const PackageInfoHandler: RequestHandler = (_, res) => { | ||
const data = WebUiDataRuntime.getPackageJson(); | ||
sendSuccess(res, data); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Router } from 'express'; | ||
import { PackageInfoHandler } from '../api/BaseInfo'; | ||
|
||
const router = Router(); | ||
// router: 获取nc的package.json信息 | ||
router.get('/PackageInfo', PackageInfoHandler); | ||
|
||
export { router as BaseRouter }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
import type { LoginListItem, SelfInfo } from '@/core'; | ||
|
||
interface LoginRuntimeType { | ||
LoginCurrentTime: number; | ||
LoginCurrentRate: number; | ||
QQLoginStatus: boolean; | ||
QQQRCodeURL: string; | ||
QQLoginUin: string; | ||
QQLoginInfo: SelfInfo; | ||
NapCatHelper: { | ||
onQuickLoginRequested: (uin: string) => Promise<{ result: boolean; message: string }>; | ||
onOB11ConfigChanged: (ob11: OneBotConfig) => Promise<void>; | ||
QQLoginList: string[]; | ||
NewQQLoginList: LoginListItem[]; | ||
}; | ||
packageJson: object; | ||
} |