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/shared-main/plugins | |
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/shared-main/plugins')
-rw-r--r-- | client/src/app/shared/shared-main/plugins/index.ts | 1 | ||||
-rw-r--r-- | client/src/app/shared/shared-main/plugins/plugin-placeholder.component.ts | 15 |
2 files changed, 16 insertions, 0 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 | } | ||