Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: thomasnordquist <7721625+thomasnordquist@users.noreply.github.com>
60 lines
1.2 KiB
TypeScript
60 lines
1.2 KiB
TypeScript
/**
|
|
* Browser-compatible dialog type definitions
|
|
* These types mirror Electron's dialog types but don't require the electron package
|
|
*/
|
|
|
|
export interface FileFilter {
|
|
name: string
|
|
extensions: string[]
|
|
}
|
|
|
|
export interface OpenDialogOptions {
|
|
title?: string
|
|
defaultPath?: string
|
|
buttonLabel?: string
|
|
filters?: FileFilter[]
|
|
properties?: Array<
|
|
| 'openFile'
|
|
| 'openDirectory'
|
|
| 'multiSelections'
|
|
| 'showHiddenFiles'
|
|
| 'createDirectory'
|
|
| 'promptToCreate'
|
|
| 'noResolveAliases'
|
|
| 'treatPackageAsDirectory'
|
|
| 'dontAddToRecent'
|
|
>
|
|
message?: string
|
|
securityScopedBookmarks?: boolean
|
|
}
|
|
|
|
export interface OpenDialogReturnValue {
|
|
canceled: boolean
|
|
filePaths: string[]
|
|
bookmarks?: string[]
|
|
}
|
|
|
|
export interface SaveDialogOptions {
|
|
title?: string
|
|
defaultPath?: string
|
|
buttonLabel?: string
|
|
filters?: FileFilter[]
|
|
message?: string
|
|
nameFieldLabel?: string
|
|
showsTagField?: boolean
|
|
properties?: Array<
|
|
| 'showHiddenFiles'
|
|
| 'createDirectory'
|
|
| 'treatPackageAsDirectory'
|
|
| 'showOverwriteConfirmation'
|
|
| 'dontAddToRecent'
|
|
>
|
|
securityScopedBookmarks?: boolean
|
|
}
|
|
|
|
export interface SaveDialogReturnValue {
|
|
canceled: boolean
|
|
filePath?: string
|
|
bookmark?: string
|
|
}
|