From de61544582726713c965d3369902f4a464f72e20 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 11 Aug 2022 15:28:11 +0200 Subject: Add plugin hooks/placeholder to share modal --- shared/models/plugins/client/client-hook.model.ts | 17 +++++++++++++++++ .../plugins/client/plugin-element-placeholder.type.ts | 5 ++++- 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'shared/models') diff --git a/shared/models/plugins/client/client-hook.model.ts b/shared/models/plugins/client/client-hook.model.ts index dda03124d..e6313b60e 100644 --- a/shared/models/plugins/client/client-hook.model.ts +++ b/shared/models/plugins/client/client-hook.model.ts @@ -72,6 +72,21 @@ export const clientFilterHookObject = { 'filter:login.instance-about-plugin-panels.create.result': true, 'filter:signup.instance-about-plugin-panels.create.result': true, + 'filter:share.video-embed-code.build.params': true, + 'filter:share.video-embed-code.build.result': true, + 'filter:share.video-playlist-embed-code.build.params': true, + 'filter:share.video-playlist-embed-code.build.result': true, + + 'filter:share.video-embed-url.build.params': true, + 'filter:share.video-embed-url.build.result': true, + 'filter:share.video-playlist-embed-url.build.params': true, + 'filter:share.video-playlist-embed-url.build.result': true, + + 'filter:share.video-url.build.params': true, + 'filter:share.video-url.build.result': true, + 'filter:share.video-playlist-url.build.params': true, + 'filter:share.video-playlist-url.build.result': true, + // Filter videojs options built for PeerTube player 'filter:internal.player.videojs.options.result': true } @@ -146,6 +161,8 @@ export const clientActionHookObject = { // Fired when the modal to download a video/caption is shown 'action:modal.video-download.shown': true, + // Fired when the modal to share a video/playlist is shown + 'action:modal.share.shown': true, // ####### Embed hooks ####### // /!\ In embed scope, peertube helpers are not available diff --git a/shared/models/plugins/client/plugin-element-placeholder.type.ts b/shared/models/plugins/client/plugin-element-placeholder.type.ts index 129099c62..7b8a2605b 100644 --- a/shared/models/plugins/client/plugin-element-placeholder.type.ts +++ b/shared/models/plugins/client/plugin-element-placeholder.type.ts @@ -1 +1,4 @@ -export type PluginElementPlaceholder = 'player-next' +export type PluginElementPlaceholder = + 'player-next' | + 'share-modal-playlist-settings' | + 'share-modal-video-settings' -- cgit v1.2.3