mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
feat: add support for sub routes under /my-account (#6218)
* feat: add support for sub routes under /my-account closes #6217 * feat(plugins/client-routes): page titles Add support for adding custom page titles in client routes. * fix(client/PluginPages): reload component upon URL change * Styling * docs(plugins): update registerClientRoute --------- Co-authored-by: Chocobozzz <me@florianbigard.com>
This commit is contained in:
@@ -872,6 +872,11 @@ To create a client page, register a new client route:
|
||||
function register ({ registerClientRoute }) {
|
||||
registerClientRoute({
|
||||
route: 'my-super/route',
|
||||
title: 'Page title for this route',
|
||||
parentRoute: '/my-account', // Optional. The full path will be /my-account/p/my-super/route.
|
||||
menuItem: { // Optional. This will add a menu item to this route. Only supported when parentRoute is '/my-account'.
|
||||
label: 'Sub route',
|
||||
},
|
||||
onMount: ({ rootEl }) => {
|
||||
rootEl.innerHTML = 'hello'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user