diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-10 15:01:12 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-10 15:01:12 +0100 |
commit | d63e6d4604dfbe4938c7d66832c9202364c5bb64 (patch) | |
tree | 6bd444be722276ff214d911284a400e374bdddc8 /shared/models/plugins | |
parent | 03a65456f44a6152bb68975e29e076c8c5754cd6 (diff) | |
download | PeerTube-d63e6d4604dfbe4938c7d66832c9202364c5bb64.tar.gz PeerTube-d63e6d4604dfbe4938c7d66832c9202364c5bb64.tar.zst PeerTube-d63e6d4604dfbe4938c7d66832c9202364c5bb64.zip |
Add ability for plugins to register client routes
Diffstat (limited to 'shared/models/plugins')
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' | |||
4 | export * from './plugin-selector-id.type' | 4 | export * from './plugin-selector-id.type' |
5 | export * from './register-client-form-field.model' | 5 | export * from './register-client-form-field.model' |
6 | export * from './register-client-hook.model' | 6 | export * from './register-client-hook.model' |
7 | export * from './register-client-route.model' | ||
7 | export * from './register-client-settings-script.model' | 8 | export * 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 @@ | |||
1 | export 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 @@ | |||
1 | import { RegisterServerSettingOptions } from '../server' | 1 | import { RegisterServerSettingOptions } from '../server' |
2 | 2 | ||
3 | export interface RegisterClientSettingsScript { | 3 | export interface RegisterClientSettingsScriptOptions { |
4 | isSettingHidden (options: { | 4 | isSettingHidden (options: { |
5 | setting: RegisterServerSettingOptions | 5 | setting: RegisterServerSettingOptions |
6 | formValues: { [name: string]: any } | 6 | formValues: { [name: string]: any } |