Plugins: document addMessageAction (toolbar buttons)
This commit is contained in:
parent
cf2dec44ed
commit
e6ea864ae1
1 changed files with 8 additions and 5 deletions
|
|
@ -82,7 +82,8 @@ instead. See **[Compiled plugins](https://orbit.tchatou.fr/docs/compiled-plugins
|
||||||
| `orbit.storage.get(key, def)/set(key, val)` | namespaced persistence |
|
| `orbit.storage.get(key, def)/set(key, val)` | namespaced persistence |
|
||||||
| `orbit.addUi(slot, render)` | add UI to a slot (returns a remover) |
|
| `orbit.addUi(slot, render)` | add UI to a slot (returns a remover) |
|
||||||
| `orbit.addSettingsSection({label, icon?, render})` | add a whole Settings section |
|
| `orbit.addSettingsSection({label, icon?, render})` | add a whole Settings section |
|
||||||
| `orbit.addMessageDecorator(m => …)` | append UI to every message; `m` = `{id, nick, text, kind, ts, mine}` |
|
| `orbit.addMessageDecorator(m => …)` | inline UI after every message's text; `m` = `{id, nick, text, kind, ts, mine}` |
|
||||||
|
| `orbit.addMessageAction(m => …)` | a button in every message's hover action toolbar (next to reply/react) |
|
||||||
| `orbit.h / orbit.html` | render helpers |
|
| `orbit.h / orbit.html` | render helpers |
|
||||||
| `log(…)` | namespaced console logger |
|
| `log(…)` | namespaced console logger |
|
||||||
|
|
||||||
|
|
@ -101,10 +102,12 @@ instead. See **[Compiled plugins](https://orbit.tchatou.fr/docs/compiled-plugins
|
||||||
| `sidebar_item` | an item in the conversation sidebar header (next to the compose button) |
|
| `sidebar_item` | an item in the conversation sidebar header (next to the compose button) |
|
||||||
| `settings_section` | a whole section in Settings (own nav entry + pane) — use `orbit.addSettingsSection()` |
|
| `settings_section` | a whole section in Settings (own nav entry + pane) — use `orbit.addSettingsSection()` |
|
||||||
|
|
||||||
Message decorators are added with `orbit.addMessageDecorator(m => …)` rather than
|
Two per-message hooks run for every rendered message:
|
||||||
a slot — the callback runs for every rendered message. Every contributed slot and
|
`orbit.addMessageDecorator(m => …)` appends inline UI after the text, and
|
||||||
decorator renders inside its own error boundary, so a crashing plugin renders
|
`orbit.addMessageAction(m => …)` adds a button to the hover action toolbar next
|
||||||
nothing instead of taking down the app.
|
to reply/react. Every contributed slot, action and decorator renders inside its
|
||||||
|
own error boundary, so a crashing plugin renders nothing instead of taking down
|
||||||
|
the app.
|
||||||
|
|
||||||
## Trust & security
|
## Trust & security
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue