aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-10 15:01:12 +0100
committerChocobozzz <me@florianbigard.com>2021-12-10 15:01:12 +0100
commitd63e6d4604dfbe4938c7d66832c9202364c5bb64 (patch)
tree6bd444be722276ff214d911284a400e374bdddc8 /shared
parent03a65456f44a6152bb68975e29e076c8c5754cd6 (diff)
downloadPeerTube-d63e6d4604dfbe4938c7d66832c9202364c5bb64.tar.gz
PeerTube-d63e6d4604dfbe4938c7d66832c9202364c5bb64.tar.zst
PeerTube-d63e6d4604dfbe4938c7d66832c9202364c5bb64.zip
Add ability for plugins to register client routes
Diffstat (limited to 'shared')
-rw-r--r--shared/models/plugins/client/index.ts1
-rw-r--r--shared/models/plugins/client/register-client-route.model.ts7
-rw-r--r--shared/models/plugins/client/register-client-settings-script.model.ts2
3 files changed, 9 insertions, 1 deletions
diff --git a/shared/models/plugins/client/index.ts b/shared/models/plugins/client/index.ts
index c500185c9..f3e3fcbcf 100644
--- a/shared/models/plugins/client/index.ts
+++ b/shared/models/plugins/client/index.ts
@@ -4,4 +4,5 @@ export * from './plugin-element-placeholder.type'
4export * from './plugin-selector-id.type' 4export * from './plugin-selector-id.type'
5export * from './register-client-form-field.model' 5export * from './register-client-form-field.model'
6export * from './register-client-hook.model' 6export * from './register-client-hook.model'
7export * from './register-client-route.model'
7export * from './register-client-settings-script.model' 8export * from './register-client-settings-script.model'
diff --git a/shared/models/plugins/client/register-client-route.model.ts b/shared/models/plugins/client/register-client-route.model.ts
new file mode 100644
index 000000000..271b67834
--- /dev/null
+++ b/shared/models/plugins/client/register-client-route.model.ts
@@ -0,0 +1,7 @@
1export interface RegisterClientRouteOptions {
2 route: string
3
4 onMount (options: {
5 rootEl: HTMLElement
6 }): void
7}
diff --git a/shared/models/plugins/client/register-client-settings-script.model.ts b/shared/models/plugins/client/register-client-settings-script.model.ts
index 481ceef96..117ca4739 100644
--- a/shared/models/plugins/client/register-client-settings-script.model.ts
+++ b/shared/models/plugins/client/register-client-settings-script.model.ts
@@ -1,6 +1,6 @@
1import { RegisterServerSettingOptions } from '../server' 1import { RegisterServerSettingOptions } from '../server'
2 2
3export interface RegisterClientSettingsScript { 3export interface RegisterClientSettingsScriptOptions {
4 isSettingHidden (options: { 4 isSettingHidden (options: {
5 setting: RegisterServerSettingOptions 5 setting: RegisterServerSettingOptions
6 formValues: { [name: string]: any } 6 formValues: { [name: string]: any }