feat: 新增脚本录制功能
This commit is contained in:
@@ -55,6 +55,18 @@ const api: WindowApi = {
|
||||
|
||||
// 打开渠道
|
||||
openChannel: (channels: any) => ipcRenderer.invoke(IPC_EVENTS.OPEN_CHANNEL, channels),
|
||||
|
||||
// 脚本管理
|
||||
scriptApi: {
|
||||
list: () => ipcRenderer.invoke(IPC_EVENTS.SCRIPT_LIST),
|
||||
get: (id: string) => ipcRenderer.invoke(IPC_EVENTS.SCRIPT_GET, id),
|
||||
save: (input: any) => ipcRenderer.invoke(IPC_EVENTS.SCRIPT_SAVE, input),
|
||||
delete: (id: string) => ipcRenderer.invoke(IPC_EVENTS.SCRIPT_DELETE, id),
|
||||
toggle: (id: string, enabled: boolean) => ipcRenderer.invoke(IPC_EVENTS.SCRIPT_TOGGLE, id, enabled),
|
||||
run: (id: string) => ipcRenderer.invoke(IPC_EVENTS.SCRIPT_RUN, id),
|
||||
startRecording: (url?: string) => ipcRenderer.invoke(IPC_EVENTS.SCRIPT_RECORD_START, url),
|
||||
stopRecording: () => ipcRenderer.invoke(IPC_EVENTS.SCRIPT_RECORD_STOP),
|
||||
},
|
||||
}
|
||||
|
||||
contextBridge.exposeInMainWorld('api', api)
|
||||
Reference in New Issue
Block a user