Expose dialogService to extensionManager (#2113)

This commit is contained in:
Chenlei Hu
2024-12-31 17:01:37 -05:00
committed by GitHub
parent 0b3c0cc0c9
commit 174a9a114a
11 changed files with 66 additions and 18 deletions

View File

@@ -229,6 +229,26 @@ https://github.com/user-attachments/assets/c142c43f-2fe9-4030-8196-b3bfd4c6977d
### Developer APIs
<details>
<summary>v1.6.13: Prompt dialog</summary>
`window.prompt` is not available in ComfyUI desktop's electron environment. Please use the following API to show a prompt dialog.
```js
window['app'].extensionManager.dialog
.prompt({
title: 'Test Prompt',
message: 'Test Prompt Message'
})
.then((value: string) => {
// Do something with the value user entered
})
```
![image](https://github.com/user-attachments/assets/c73f74d0-9bb4-4555-8d56-83f1be4a1d7e)
</details>
<details>
<summary>v1.3.34: Register about panel badges</summary>