aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/plugins/guide.md
diff options
context:
space:
mode:
authorKim <1877318+kimsible@users.noreply.github.com>2020-04-15 15:35:41 +0200
committerGitHub <noreply@github.com>2020-04-15 15:35:41 +0200
commit437e8e06eb32ffe21111f0946115aae0e4c33381 (patch)
treec221f0c41b4d29de00f4a3318393c32a83b02fe5 /support/doc/plugins/guide.md
parent45c14ae1b2884e75c6341117489ea39ae0e1a3bc (diff)
downloadPeerTube-437e8e06eb32ffe21111f0946115aae0e4c33381.tar.gz
PeerTube-437e8e06eb32ffe21111f0946115aae0e4c33381.tar.zst
PeerTube-437e8e06eb32ffe21111f0946115aae0e4c33381.zip
Add custom modal to plugin helpers (#2631)
* Add custom modal component * Add custom modal to app and plugins helpers * Fixes custom modal component * Add doc for custom modal * Fix newline end of file html and scss files * Move my-custom-modal component outside component for UserLoggedIn modals * Move initializeCustomModal to ngAfterViewInit() * Wrap events and conditionnals * Replace ng-show with ngIf* * Add modalRef to open only one modal + onCloseClick * Refacto + Fix access methods of custom modal * Fix methods names custom-modal.component * Fix implement AfterViewInit & no default boolean Co-authored-by: kimsible <kimsible@users.noreply.github.com>
Diffstat (limited to 'support/doc/plugins/guide.md')
-rw-r--r--support/doc/plugins/guide.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/support/doc/plugins/guide.md b/support/doc/plugins/guide.md
index 5251ce48a..e6870ce17 100644
--- a/support/doc/plugins/guide.md
+++ b/support/doc/plugins/guide.md
@@ -216,6 +216,24 @@ notifier.success('Success message content.')
216notifier.error('Error message content.') 216notifier.error('Error message content.')
217``` 217```
218 218
219#### Custom Modal
220
221To show a custom modal:
222
223```js
224 peertubeHelpers.showModal({
225 title: 'My custom modal title',
226 content: '<p>My custom modal content</p>',
227 // Optionals parameters :
228 // show close icon
229 close: true,
230 // show cancel button and call action() after hiding modal
231 cancel: { value: 'cancel', action: () => {} },
232 // show confirm button and call action() after hiding modal
233 confirm: { value: 'confirm', action: () => {} },
234 })
235```
236
219#### Translate 237#### Translate
220 238
221You can translate some strings of your plugin (PeerTube will use your `translations` object of your `package.json` file): 239You can translate some strings of your plugin (PeerTube will use your `translations` object of your `package.json` file):