feat: add admin updates page with release history

Shows bot and cabinet releases with version badges,
changelogs, and update detection via __APP_VERSION__.
This commit is contained in:
Fringg
2026-02-08 23:20:49 +03:00
parent ab0270ac58
commit a15b3d4101
8 changed files with 428 additions and 9 deletions

32
src/api/adminUpdates.ts Normal file
View File

@@ -0,0 +1,32 @@
import apiClient from './client';
// ============ Types ============
export interface ReleaseItem {
tag_name: string;
name: string;
body: string;
published_at: string;
prerelease: boolean;
}
export interface ProjectReleasesInfo {
current_version: string;
has_updates: boolean;
releases: ReleaseItem[];
repo_url: string;
}
export interface ReleasesResponse {
bot: ProjectReleasesInfo;
cabinet: ProjectReleasesInfo;
}
// ============ API ============
export const adminUpdatesApi = {
getReleases: async (): Promise<ReleasesResponse> => {
const response = await apiClient.get('/cabinet/admin/updates/releases');
return response.data;
},
};