diff options
Diffstat (limited to 'support/doc/plugins/guide.md')
-rw-r--r-- | support/doc/plugins/guide.md | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/support/doc/plugins/guide.md b/support/doc/plugins/guide.md index bdc9d2ad8..5251ce48a 100644 --- a/support/doc/plugins/guide.md +++ b/support/doc/plugins/guide.md | |||
@@ -197,7 +197,7 @@ The `ping` route can be accessed using: | |||
197 | 197 | ||
198 | ### Client helpers (themes & plugins) | 198 | ### Client helpers (themes & plugins) |
199 | 199 | ||
200 | ### Plugin static route | 200 | #### Plugin static route |
201 | 201 | ||
202 | To get your plugin static route: | 202 | To get your plugin static route: |
203 | 203 | ||
@@ -206,6 +206,16 @@ const baseStaticUrl = peertubeHelpers.getBaseStaticRoute() | |||
206 | const imageUrl = baseStaticUrl + '/images/chocobo.png' | 206 | const imageUrl = baseStaticUrl + '/images/chocobo.png' |
207 | ``` | 207 | ``` |
208 | 208 | ||
209 | #### Notifier | ||
210 | |||
211 | To notify the user with the PeerTube ToastModule: | ||
212 | |||
213 | ```js | ||
214 | const { notifier } = peertubeHelpers | ||
215 | notifier.success('Success message content.') | ||
216 | notifier.error('Error message content.') | ||
217 | ``` | ||
218 | |||
209 | #### Translate | 219 | #### Translate |
210 | 220 | ||
211 | You can translate some strings of your plugin (PeerTube will use your `translations` object of your `package.json` file): | 221 | You can translate some strings of your plugin (PeerTube will use your `translations` object of your `package.json` file): |