aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/plugins/shared/plugin-card.component.ts
blob: 462a6c213f58a3cb80aff76e7404b5da5ce49cb7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { Component, Input } from '@angular/core'
import { PeerTubePlugin, PeerTubePluginIndex, PluginType } from '@shared/models'
import { PluginApiService } from './plugin-api.service'

@Component({
  selector: 'my-plugin-card',
  templateUrl: './plugin-card.component.html',
  styleUrls: [ './plugin-card.component.scss' ]
})

export class PluginCardComponent {
  @Input() plugin: PeerTubePluginIndex | PeerTubePlugin
  @Input() version: string
  @Input() pluginType: PluginType

  constructor (
    private pluginApiService: PluginApiService
  ) {
  }

  getPluginOrThemeHref (name: string) {
    return this.pluginApiService.getPluginOrThemeHref(this.pluginType, name)
  }
}