]>
Commit | Line | Data |
---|---|---|
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 | } |