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