mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-01 08:10:25 +00:00
Add backend and frontend support for NapCat auto-update
Introduces backend API and router for updating NapCat, including update logic and pending update application on startup. Adds frontend integration with update button and request handling. Refactors system info component to remove legacy new version tip. Updates types and runtime to track working environment for update selection. Implements lazy loading for pty in unixTerminal to avoid early initialization.
This commit is contained in:
@@ -48,6 +48,15 @@ export default class WebUIManager {
|
||||
return data.data;
|
||||
}
|
||||
|
||||
public static async UpdateNapCat () {
|
||||
const { data } = await serverRequest.post<ServerResponse<any>>(
|
||||
'/UpdateNapCat/update',
|
||||
{},
|
||||
{ timeout: 60000 } // 1分钟超时
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
public static async getQQVersion () {
|
||||
const { data } =
|
||||
await serverRequest.get<ServerResponse<string>>('/base/QQVersion');
|
||||
|
||||
Reference in New Issue
Block a user