From 62bc0352d9d465ce9d7c3e074b1b60bf99155e24 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 12 Apr 2021 11:10:57 +0200 Subject: Add plugin placeholder elements support --- client/src/app/shared/shared-main/plugins/index.ts | 1 + .../shared-main/plugins/plugin-placeholder.component.ts | 15 +++++++++++++++ client/src/app/shared/shared-main/shared-main.module.ts | 9 +++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 client/src/app/shared/shared-main/plugins/index.ts create mode 100644 client/src/app/shared/shared-main/plugins/plugin-placeholder.component.ts (limited to 'client/src/app/shared') 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 @@ +import { Component, Input } from '@angular/core' +import { PluginElementPlaceholder } from '@shared/models' + +@Component({ + selector: 'my-plugin-placeholder', + template: '
' +}) + +export class PluginPlaceholderComponent { + @Input() pluginId: PluginElementPlaceholder + + getId () { + return 'plugin-placeholder-' + this.pluginId + } +} 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' import { FeedComponent } from './feeds' import { LoaderComponent, SmallLoaderComponent } from './loaders' import { HelpComponent, ListOverflowComponent, SimpleSearchInputComponent, TopMenuDropdownComponent } from './misc' +import { PluginPlaceholderComponent } from './plugins' import { UserHistoryService, UserNotificationsComponent, UserNotificationService, UserQuotaComponent } from './users' import { RedundancyService, VideoImportService, VideoOwnershipService, VideoService } from './video' import { VideoCaptionService } from './video-caption' @@ -92,7 +93,9 @@ import { VideoChannelService } from './video-channel' SimpleSearchInputComponent, UserQuotaComponent, - UserNotificationsComponent + UserNotificationsComponent, + + PluginPlaceholderComponent ], exports: [ @@ -144,7 +147,9 @@ import { VideoChannelService } from './video-channel' SimpleSearchInputComponent, UserQuotaComponent, - UserNotificationsComponent + UserNotificationsComponent, + + PluginPlaceholderComponent ], providers: [ -- cgit v1.2.3