diff options
author | Chocobozzz <me@florianbigard.com> | 2021-04-12 11:10:57 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-04-12 11:19:15 +0200 |
commit | 62bc0352d9d465ce9d7c3e074b1b60bf99155e24 (patch) | |
tree | 7cfbf827b7b8c802ae79fb87e55c9d960120400f /client/src/app/shared | |
parent | c96e457bde8495cf9103bf819f887f341a528543 (diff) | |
download | PeerTube-62bc0352d9d465ce9d7c3e074b1b60bf99155e24.tar.gz PeerTube-62bc0352d9d465ce9d7c3e074b1b60bf99155e24.tar.zst PeerTube-62bc0352d9d465ce9d7c3e074b1b60bf99155e24.zip |
Add plugin placeholder elements support
Diffstat (limited to 'client/src/app/shared')
3 files changed, 23 insertions, 2 deletions
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 @@ | |||
1 | import { Component, Input } from '@angular/core' | ||
2 | import { PluginElementPlaceholder } from '@shared/models' | ||
3 | |||
4 | @Component({ | ||
5 | selector: 'my-plugin-placeholder', | ||
6 | template: '<div [id]="getId()"></div>' | ||
7 | }) | ||
8 | |||
9 | export 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' | |||
33 | import { FeedComponent } from './feeds' | 33 | import { FeedComponent } from './feeds' |
34 | import { LoaderComponent, SmallLoaderComponent } from './loaders' | 34 | import { LoaderComponent, SmallLoaderComponent } from './loaders' |
35 | import { HelpComponent, ListOverflowComponent, SimpleSearchInputComponent, TopMenuDropdownComponent } from './misc' | 35 | import { HelpComponent, ListOverflowComponent, SimpleSearchInputComponent, TopMenuDropdownComponent } from './misc' |
36 | import { PluginPlaceholderComponent } from './plugins' | ||
36 | import { UserHistoryService, UserNotificationsComponent, UserNotificationService, UserQuotaComponent } from './users' | 37 | import { UserHistoryService, UserNotificationsComponent, UserNotificationService, UserQuotaComponent } from './users' |
37 | import { RedundancyService, VideoImportService, VideoOwnershipService, VideoService } from './video' | 38 | import { RedundancyService, VideoImportService, VideoOwnershipService, VideoService } from './video' |
38 | import { VideoCaptionService } from './video-caption' | 39 | import { 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: [ |