diff options
Diffstat (limited to 'client/src/app/+admin/plugins/shared/plugin-card.component.ts')
-rw-r--r-- | client/src/app/+admin/plugins/shared/plugin-card.component.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/client/src/app/+admin/plugins/shared/plugin-card.component.ts b/client/src/app/+admin/plugins/shared/plugin-card.component.ts new file mode 100644 index 000000000..462a6c213 --- /dev/null +++ b/client/src/app/+admin/plugins/shared/plugin-card.component.ts | |||
@@ -0,0 +1,24 @@ | |||
1 | import { Component, Input } from '@angular/core' | ||
2 | import { PeerTubePlugin, PeerTubePluginIndex, PluginType } from '@shared/models' | ||
3 | import { PluginApiService } from './plugin-api.service' | ||
4 | |||
5 | @Component({ | ||
6 | selector: 'my-plugin-card', | ||
7 | templateUrl: './plugin-card.component.html', | ||
8 | styleUrls: [ './plugin-card.component.scss' ] | ||
9 | }) | ||
10 | |||
11 | export class PluginCardComponent { | ||
12 | @Input() plugin: PeerTubePluginIndex | PeerTubePlugin | ||
13 | @Input() version: string | ||
14 | @Input() pluginType: PluginType | ||
15 | |||
16 | constructor ( | ||
17 | private pluginApiService: PluginApiService | ||
18 | ) { | ||
19 | } | ||
20 | |||
21 | getPluginOrThemeHref (name: string) { | ||
22 | return this.pluginApiService.getPluginOrThemeHref(this.pluginType, name) | ||
23 | } | ||
24 | } | ||