feat: integrate Playwright download dialog into startup flow
This commit is contained in:
@@ -4,6 +4,10 @@ import type { IpcResult } from '../../main/types/ipc.types'
|
||||
import type { DownloadProgress } from '../index.d'
|
||||
|
||||
export const playwrightBrowserApi = {
|
||||
check: async (): Promise<IpcResult<boolean>> => {
|
||||
return ipcRenderer.invoke(IPC_CHANNELS.PLAYWRIGHT_BROWSER_CHECK)
|
||||
},
|
||||
|
||||
download: async (): Promise<IpcResult<void>> => {
|
||||
return ipcRenderer.invoke(IPC_CHANNELS.PLAYWRIGHT_BROWSER_DOWNLOAD)
|
||||
},
|
||||
|
||||
1
src/preload/index.d.ts
vendored
1
src/preload/index.d.ts
vendored
@@ -151,6 +151,7 @@ export interface DownloadProgress {
|
||||
}
|
||||
|
||||
export interface PlaywrightBrowserAPI {
|
||||
check: () => Promise<IpcResult<boolean>>
|
||||
download: () => Promise<IpcResult<void>>
|
||||
cancel: () => Promise<IpcResult<void>>
|
||||
onProgress: (callback: (data: DownloadProgress) => void) => () => void
|
||||
|
||||
Reference in New Issue
Block a user