aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/plugins/guide.md
diff options
context:
space:
mode:
authorKim <1877318+kimsible@users.noreply.github.com>2020-04-15 09:08:59 +0200
committerGitHub <noreply@github.com>2020-04-15 09:08:59 +0200
commit74c2dece42d387506421623fbfadc83da811ebcd (patch)
tree4dc2afe77cdcaafd36461351990d6851da9ca071 /support/doc/plugins/guide.md
parentbb152476c819e4c7487d080433c616f0d523e049 (diff)
downloadPeerTube-74c2dece42d387506421623fbfadc83da811ebcd.tar.gz
PeerTube-74c2dece42d387506421623fbfadc83da811ebcd.tar.zst
PeerTube-74c2dece42d387506421623fbfadc83da811ebcd.zip
Add notifier to plugin helpers (#2627)
* Add notifier to client PeerTubeHelpers plugin * Add doc for notifier PeerTubeHelpers * Add getBaseClientScriptsRoute to client PeerTubeHelpers plugin * Add doc for getBaseClientScriptsRoute PeerTubeHelpers * Remove unused helper Co-authored-by: kimsible <kimsible@users.noreply.github.com>
Diffstat (limited to 'support/doc/plugins/guide.md')
-rw-r--r--support/doc/plugins/guide.md12
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
202To get your plugin static route: 202To get your plugin static route:
203 203
@@ -206,6 +206,16 @@ const baseStaticUrl = peertubeHelpers.getBaseStaticRoute()
206const imageUrl = baseStaticUrl + '/images/chocobo.png' 206const imageUrl = baseStaticUrl + '/images/chocobo.png'
207``` 207```
208 208
209#### Notifier
210
211To notify the user with the PeerTube ToastModule:
212
213```js
214const { notifier } = peertubeHelpers
215notifier.success('Success message content.')
216notifier.error('Error message content.')
217```
218
209#### Translate 219#### Translate
210 220
211You can translate some strings of your plugin (PeerTube will use your `translations` object of your `package.json` file): 221You can translate some strings of your plugin (PeerTube will use your `translations` object of your `package.json` file):