feat: integrate Playwright download dialog into startup flow

This commit is contained in:
Misaka_Company
2026-03-24 16:02:31 +08:00
parent a711781f21
commit fbd62fe390
8 changed files with 101 additions and 16 deletions

View File

@@ -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)
},

View File

@@ -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