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:
1 parent
d525f9b03d
commit
173a165c4b
6 files changed
+182
-11
No files matched your search
@@ -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',
|
||||
|
||||
Reference in new issue
Block a user