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:
手瓜一十雪
2025-11-19 21:05:08 +08:00
parent 907861102b
commit acdd56eb5e
11 changed files with 641 additions and 164 deletions

View File

@@ -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');