Add latest version check and update prompt to UI

Introduces backend and frontend logic to fetch the latest NapCat version tag from multiple sources, exposes a new API endpoint, and adds a UI prompt to notify users of new versions with an update button. Also includes minor code style improvements in dialog context.
This commit is contained in:
手瓜一十雪
2025-11-22 13:52:49 +08:00
parent 8cc3c6eb1c
commit 9fd822aa6a
6 changed files with 182 additions and 11 deletions

View File

@@ -48,6 +48,12 @@ export default class WebUIManager {
return data.data;
}
public static async getLatestTag () {
const { data } =
await serverRequest.get<ServerResponse<string>>('/base/getLatestTag');
return data.data;
}
public static async UpdateNapCat () {
const { data } = await serverRequest.post<ServerResponse<any>>(
'/UpdateNapCat/update',