aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-04-12 11:10:57 +0200
committerChocobozzz <me@florianbigard.com>2021-04-12 11:19:15 +0200
commit62bc0352d9d465ce9d7c3e074b1b60bf99155e24 (patch)
tree7cfbf827b7b8c802ae79fb87e55c9d960120400f /client
parentc96e457bde8495cf9103bf819f887f341a528543 (diff)
downloadPeerTube-62bc0352d9d465ce9d7c3e074b1b60bf99155e24.tar.gz
PeerTube-62bc0352d9d465ce9d7c3e074b1b60bf99155e24.tar.zst
PeerTube-62bc0352d9d465ce9d7c3e074b1b60bf99155e24.zip
Add plugin placeholder elements support
Diffstat (limited to 'client')
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.component.html2
-rw-r--r--client/src/app/core/core.module.ts5
-rw-r--r--client/src/app/shared/shared-main/plugins/index.ts1
-rw-r--r--client/src/app/shared/shared-main/plugins/plugin-placeholder.component.ts15
-rw-r--r--client/src/app/shared/shared-main/shared-main.module.ts9
5 files changed, 27 insertions, 5 deletions
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.html b/client/src/app/+videos/+video-watch/video-watch.component.html
index 99103c2c3..c1ba0a755 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.html
+++ b/client/src/app/+videos/+video-watch/video-watch.component.html
@@ -16,6 +16,8 @@
16 [playlist]="playlist" class="playlist" 16 [playlist]="playlist" class="playlist"
17 (videoFound)="onPlaylistVideoFound($event)" 17 (videoFound)="onPlaylistVideoFound($event)"
18 ></my-video-watch-playlist> 18 ></my-video-watch-playlist>
19
20 <my-plugin-placeholder pluginId="player-next"></my-plugin-placeholder>
19 </div> 21 </div>
20 22
21 <div class="row"> 23 <div class="row">
diff --git a/client/src/app/core/core.module.ts b/client/src/app/core/core.module.ts
index 2392a234c..3152a7003 100644
--- a/client/src/app/core/core.module.ts
+++ b/client/src/app/core/core.module.ts
@@ -5,8 +5,7 @@ import { CommonModule } from '@angular/common'
5import { NgModule, Optional, SkipSelf } from '@angular/core' 5import { NgModule, Optional, SkipSelf } from '@angular/core'
6import { BrowserAnimationsModule } from '@angular/platform-browser/animations' 6import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
7import { PeerTubeSocket } from '@app/core/notification/peertube-socket.service' 7import { PeerTubeSocket } from '@app/core/notification/peertube-socket.service'
8import { HooksService } from '@app/core/plugins/hooks.service' 8import { HooksService, PluginService } from '@app/core/plugins'
9import { PluginService } from '@app/core/plugins/plugin.service'
10import { AuthService } from './auth' 9import { AuthService } from './auth'
11import { ConfirmService } from './confirm' 10import { ConfirmService } from './confirm'
12import { CheatSheetComponent } from './hotkeys' 11import { CheatSheetComponent } from './hotkeys'
@@ -15,7 +14,7 @@ import { throwIfAlreadyLoaded } from './module-import-guard'
15import { Notifier } from './notification' 14import { Notifier } from './notification'
16import { HtmlRendererService, LinkifierService, MarkdownService } from './renderer' 15import { HtmlRendererService, LinkifierService, MarkdownService } from './renderer'
17import { RestExtractor, RestService } from './rest' 16import { RestExtractor, RestService } from './rest'
18import { LoginGuard, RedirectService, UserRightGuard, UnloggedGuard } from './routing' 17import { LoginGuard, RedirectService, UnloggedGuard, UserRightGuard } from './routing'
19import { CanDeactivateGuard } from './routing/can-deactivate-guard.service' 18import { CanDeactivateGuard } from './routing/can-deactivate-guard.service'
20import { ServerConfigResolver } from './routing/server-config-resolver.service' 19import { ServerConfigResolver } from './routing/server-config-resolver.service'
21import { ScopedTokensService } from './scoped-tokens' 20import { ScopedTokensService } from './scoped-tokens'
diff --git a/client/src/app/shared/shared-main/plugins/index.ts b/client/src/app/shared/shared-main/plugins/index.ts
new file mode 100644
index 000000000..f36dab624
--- /dev/null
+++ b/client/src/app/shared/shared-main/plugins/index.ts
@@ -0,0 +1 @@
export * from './plugin-placeholder.component'
diff --git a/client/src/app/shared/shared-main/plugins/plugin-placeholder.component.ts b/client/src/app/shared/shared-main/plugins/plugin-placeholder.component.ts
new file mode 100644
index 000000000..93ba9fb9b
--- /dev/null
+++ b/client/src/app/shared/shared-main/plugins/plugin-placeholder.component.ts
@@ -0,0 +1,15 @@
1import { Component, Input } from '@angular/core'
2import { PluginElementPlaceholder } from '@shared/models'
3
4@Component({
5 selector: 'my-plugin-placeholder',
6 template: '<div [id]="getId()"></div>'
7})
8
9export class PluginPlaceholderComponent {
10 @Input() pluginId: PluginElementPlaceholder
11
12 getId () {
13 return 'plugin-placeholder-' + this.pluginId
14 }
15}
diff --git a/client/src/app/shared/shared-main/shared-main.module.ts b/client/src/app/shared/shared-main/shared-main.module.ts
index 16d230f46..772198cb2 100644
--- a/client/src/app/shared/shared-main/shared-main.module.ts
+++ b/client/src/app/shared/shared-main/shared-main.module.ts
@@ -33,6 +33,7 @@ import { DateToggleComponent } from './date'
33import { FeedComponent } from './feeds' 33import { FeedComponent } from './feeds'
34import { LoaderComponent, SmallLoaderComponent } from './loaders' 34import { LoaderComponent, SmallLoaderComponent } from './loaders'
35import { HelpComponent, ListOverflowComponent, SimpleSearchInputComponent, TopMenuDropdownComponent } from './misc' 35import { HelpComponent, ListOverflowComponent, SimpleSearchInputComponent, TopMenuDropdownComponent } from './misc'
36import { PluginPlaceholderComponent } from './plugins'
36import { UserHistoryService, UserNotificationsComponent, UserNotificationService, UserQuotaComponent } from './users' 37import { UserHistoryService, UserNotificationsComponent, UserNotificationService, UserQuotaComponent } from './users'
37import { RedundancyService, VideoImportService, VideoOwnershipService, VideoService } from './video' 38import { RedundancyService, VideoImportService, VideoOwnershipService, VideoService } from './video'
38import { VideoCaptionService } from './video-caption' 39import { VideoCaptionService } from './video-caption'
@@ -92,7 +93,9 @@ import { VideoChannelService } from './video-channel'
92 SimpleSearchInputComponent, 93 SimpleSearchInputComponent,
93 94
94 UserQuotaComponent, 95 UserQuotaComponent,
95 UserNotificationsComponent 96 UserNotificationsComponent,
97
98 PluginPlaceholderComponent
96 ], 99 ],
97 100
98 exports: [ 101 exports: [
@@ -144,7 +147,9 @@ import { VideoChannelService } from './video-channel'
144 SimpleSearchInputComponent, 147 SimpleSearchInputComponent,
145 148
146 UserQuotaComponent, 149 UserQuotaComponent,
147 UserNotificationsComponent 150 UserNotificationsComponent,
151
152 PluginPlaceholderComponent
148 ], 153 ],
149 154
150 providers: [ 155 providers: [