Skip to content

Commit 41c93ca

Browse files
committed
Reference API for new dialog and exec.close() APIs
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
1 parent b214f2c commit 41c93ca

File tree

6 files changed

+95
-2
lines changed

6 files changed

+95
-2
lines changed

docs/dev/api/reference/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@
1313
- [ExecResultV0](interfaces/ExecResultV0.md)
1414
- [RequestConfigV0](interfaces/RequestConfigV0.md)
1515
- [BackendV0](interfaces/BackendV0.md)
16+
- [OpenDialogResult](interfaces/OpenDialogResult.md)
17+
- [Dialog](interfaces/Dialog.md)
1618
- [Docker](interfaces/Docker.md)
1719
- [DockerCommand](interfaces/DockerCommand.md)
1820
- [Exec](interfaces/Exec.md)
21+
- [ExecProcess](interfaces/ExecProcess.md)
1922
- [ExecStreamOptions](interfaces/ExecStreamOptions.md)
2023
- [ExecResult](interfaces/ExecResult.md)
2124
- [RawExecResult](interfaces/RawExecResult.md)

docs/dev/api/reference/interfaces/DesktopUI.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Properties
66

77
- [toast](DesktopUI.md#toast)
8+
- [dialog](DesktopUI.md#dialog)
89
- [navigate](DesktopUI.md#navigate)
910

1011
## Properties
@@ -15,6 +16,12 @@
1516

1617
___
1718

19+
### dialog
20+
21+
`Readonly` **dialog**: [`Dialog`](Dialog.md)
22+
23+
___
24+
1825
### navigate
1926

2027
`Readonly` **navigate**: [`NavigationIntents`](NavigationIntents.md)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Interface: Dialog
2+
3+
Allows to open native dialog boxes.
4+
5+
## Table of contents
6+
7+
### Methods
8+
9+
- [showOpenDialog](Dialog.md#showopendialog)
10+
11+
## Methods
12+
13+
### showOpenDialog
14+
15+
**showOpenDialog**(`dialogProperties`): `Promise`<[`OpenDialogResult`](OpenDialogResult.md)\>
16+
17+
Display a native open dialog, allowing to select a file or a folder.
18+
19+
```typescript
20+
ddClient.desktopUI.dialog.showOpenDialog({properties: ['openFile']});
21+
```
22+
23+
#### Parameters
24+
25+
| Name | Type | Description |
26+
| :------ | :------ | :------ |
27+
| `dialogProperties` | `any` | properties to specify the open dialog behaviour, see https://www.electronjs.org/docs/latest/api/dialog#dialogshowopendialogbrowserwindow-options. |
28+
29+
#### Returns
30+
31+
`Promise`<[`OpenDialogResult`](OpenDialogResult.md)\>

docs/dev/api/reference/interfaces/Exec.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ A promise that will resolve once the command finishes.
2323

2424
### Exec
2525

26-
**Exec**(`cmd`, `args`, `options`): `void`
26+
**Exec**(`cmd`, `args`, `options`): [`ExecProcess`](ExecProcess.md)
2727

2828
Streams the result of a command if `stream` is specified in the `options` parameter.
2929

@@ -40,4 +40,4 @@ Specify the `stream` if the output of your command is too long or if you need to
4040

4141
#### Returns
4242

43-
`void`
43+
[`ExecProcess`](ExecProcess.md)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Interface: ExecProcess
2+
3+
## Table of contents
4+
5+
### Methods
6+
7+
- [close](ExecProcess.md#close)
8+
9+
## Methods
10+
11+
### close
12+
13+
**close**(): `void`
14+
15+
Close the process started by exec(streamingOptions)
16+
17+
#### Returns
18+
19+
`void`
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Interface: OpenDialogResult
2+
3+
## Table of contents
4+
5+
### Properties
6+
7+
- [canceled](OpenDialogResult.md#canceled)
8+
- [filePaths](OpenDialogResult.md#filepaths)
9+
- [bookmarks](OpenDialogResult.md#bookmarks)
10+
11+
## Properties
12+
13+
### canceled
14+
15+
`Readonly` **canceled**: `boolean`
16+
17+
whether or not the dialog was canceled.
18+
19+
___
20+
21+
### filePaths
22+
23+
`Readonly` **filePaths**: `string`[]
24+
25+
An array of file paths chosen by the user. If the dialog is cancelled this will be an empty array.
26+
27+
___
28+
29+
### bookmarks
30+
31+
`Optional` `Readonly` **bookmarks**: `string`[]
32+
33+
macOS only- An array matching the filePaths array of base64 encoded strings which contains security scoped bookmark data. securityScopedBookmarks must be enabled for this to be populated

0 commit comments

Comments
 (0)