Add route hook action
This commit is contained in:
parent
1fd372ecbc
commit
73a0294104
@ -46,6 +46,13 @@ function register ({ registerHook, peertubeHelpers }) {
|
||||
handler: result => addSymbolToVideoNameResult(result, ':D')
|
||||
})
|
||||
|
||||
// Router hooks
|
||||
|
||||
registerHook({
|
||||
target: 'action:router.navigation-end',
|
||||
handler: params => console.log('New URL! %s.', params.path)
|
||||
})
|
||||
|
||||
// Fake hook
|
||||
|
||||
registerHook({
|
||||
|
@ -15,9 +15,17 @@ async function register ({ registerHook, registerSetting, settingsManager, stora
|
||||
name: 'admin-name',
|
||||
label: 'Admin name',
|
||||
type: 'input',
|
||||
private: true,
|
||||
default: defaultAdmin
|
||||
})
|
||||
|
||||
registerSetting({
|
||||
name: 'user-name',
|
||||
label: 'User name',
|
||||
type: 'input',
|
||||
private: false
|
||||
})
|
||||
|
||||
const value = await storageManager.getData('toto')
|
||||
console.log(value)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "peertube-plugin-hello-world",
|
||||
"version": "0.0.11",
|
||||
"version": "0.0.12",
|
||||
"description": "Hello world PeerTube plugin example",
|
||||
"engine": {
|
||||
"peertube": ">=1.3.0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user