Support more filters

This commit is contained in:
Chocobozzz 2022-01-20 09:36:52 +01:00
parent f869a02e24
commit e7aa6925e5
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 59 additions and 8 deletions

View File

@ -7,6 +7,19 @@ function register ({ registerHook, peertubeHelpers }) {
document.querySelector('.looking-for-account > div').innerHTML = 'Hello'
}
})
registerHook({
target: 'filter:login.instance-about-plugin-panels.create.result',
handler: result => {
return result.concat([
{
id: 'riri',
title: 'Riri',
html: 'Riri <strong>Duck</strong>'
}
])
}
})
}
export {

View File

@ -0,0 +1,18 @@
function register ({ registerHook, peertubeHelpers }) {
registerHook({
target: 'filter:signup.instance-about-plugin-panels.create.result',
handler: result => {
return result.concat([
{
id: 'loulou',
title: 'Loulou',
html: 'Loulou <strong>Duck</strong>'
}
])
}
})
}
export {
register
}

View File

@ -1,6 +1,6 @@
{
"name": "peertube-plugin-hello-world",
"version": "0.0.18",
"version": "0.0.19",
"description": "Hello world PeerTube plugin example",
"engine": {
"peertube": ">=3.2.0"
@ -23,31 +23,51 @@
"clientScripts": [
{
"script": "client/common-client-plugin.js",
"scopes": [ "common" ]
"scopes": [
"common"
]
},
{
"script": "client/video-watch-client-plugin.js",
"scopes": [ "video-watch" ]
"scopes": [
"video-watch"
]
},
{
"script": "client/search-client-plugin.js",
"scopes": [ "search" ]
"scopes": [
"search"
]
},
{
"script": "client/login-client-plugin.js",
"scopes": [ "login" ]
"scopes": [
"login"
]
},
{
"script": "client/signup-client-plugin.js",
"scopes": [
"signup"
]
},
{
"script": "client/embed-client-plugin.js",
"scopes": [ "embed" ]
"scopes": [
"embed"
]
},
{
"script": "client/video-edit-client-plugin.js",
"scopes": [ "video-edit" ]
"scopes": [
"video-edit"
]
},
{
"script": "client/admin-plugin-client-plugin.js",
"scopes": [ "admin-plugin" ]
"scopes": [
"admin-plugin"
]
}
],
"translations": {