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:
1 parent
907861102b
commit
acdd56eb5e
11 files changed
+641
-164
No files matched your search
@@ -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