系统控制台完成更新

This commit is contained in:
ryan
2026-06-12 14:12:03 +08:00
parent 407c1edf74
commit c916f566d9
34 changed files with 1297 additions and 40 deletions
@@ -1,6 +1,7 @@
import {BaseService} from '@/lib/services';
import type {
AdminUser,
AppUpdateStatus,
AuthSource,
AuthSourceRequest,
CacheConfig,
@@ -136,6 +137,16 @@ export class AdminService extends BaseService {
return this.post<{ success: boolean; log: string; error: string }>('/system-configs/smtp/test', request);
}
// ==================== 应用更新 ====================
static async getUpdateStatus(): Promise<AppUpdateStatus> {
return this.get<AppUpdateStatus>('/update');
}
static async applyUpdate(): Promise<void> {
return this.post<void>('/update/apply');
}
/**
* 获取所有已存在的文件业务类型及默认内置类型列表
* @returns 业务类型列表
+1
View File
@@ -42,6 +42,7 @@ export type {
UpdateUserStatusRequest,
SystemStatus,
DatabaseInfo,
AppUpdateStatus,
Schedule,
CreateScheduleRequest,
UpdateScheduleRequest,
+19 -1
View File
@@ -439,6 +439,25 @@ export interface DatabaseInfo {
version: string;
}
/**
* 应用更新状态
*/
export interface AppUpdateStatus {
current_version: string;
build_time: string;
latest_version: string;
update_available: boolean;
can_upgrade: boolean;
prerelease: boolean;
release_name: string;
release_notes: string;
release_url: string;
published_at: string;
upstream_repository: string;
asset_name: string;
platform: string;
}
// ==================== 缓存管理 ====================
/**
@@ -470,4 +489,3 @@ export interface CacheConfig {
/** 是否启用 LRU 淘汰 */
lru_enabled: boolean;
}