(options?: ImportOptions)
| 71 | }; |
| 72 | |
| 73 | export const importImageFromPicker = async (options?: ImportOptions) => { |
| 74 | const result = await dialog.open({ |
| 75 | filters: [ |
| 76 | { |
| 77 | name: "Image Files", |
| 78 | extensions: imageExtensions, |
| 79 | }, |
| 80 | ], |
| 81 | multiple: false, |
| 82 | }); |
| 83 | const path = selectedPath(result); |
| 84 | if (!path) return null; |
| 85 | return await importImagePath(path, options); |
| 86 | }; |
| 87 | |
| 88 | export const showImportError = async ( |
| 89 | mediaType: "video" | "image", |
no test coverage detected