]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/plugins/shared/plugin-card.component.ts
462a6c213f58a3cb80aff76e7404b5da5ce49cb7
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / plugins / shared / plugin-card.component.ts
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 }