mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-03-16 07:56:38 +08:00
feat: 增加WOL服务端历史记录并支持跨浏览器同步
This commit is contained in:
@@ -136,6 +136,15 @@ export const msdConfigApi = {
|
||||
// ===== ATX 配置 API =====
|
||||
import type { AtxDevices } from '@/types/generated'
|
||||
|
||||
export interface WolHistoryEntry {
|
||||
mac_address: string
|
||||
updated_at: number
|
||||
}
|
||||
|
||||
export interface WolHistoryResponse {
|
||||
history: WolHistoryEntry[]
|
||||
}
|
||||
|
||||
export const atxConfigApi = {
|
||||
/**
|
||||
* 获取 ATX 配置
|
||||
@@ -166,6 +175,13 @@ export const atxConfigApi = {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ mac_address: macAddress }),
|
||||
}),
|
||||
|
||||
/**
|
||||
* 获取 WOL 历史记录(服务端持久化)
|
||||
* @param limit 返回条数(1-50)
|
||||
*/
|
||||
getWolHistory: (limit = 5) =>
|
||||
request<WolHistoryResponse>(`/atx/wol/history?limit=${Math.max(1, Math.min(50, limit))}`),
|
||||
}
|
||||
|
||||
// ===== Audio 配置 API =====
|
||||
|
||||
Reference in New Issue
Block a user