]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/shared-main/buttons/delete-button.component.ts
Fix report modal error
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / buttons / delete-button.component.ts
CommitLineData
8c6781e9 1import { Component, Input, OnInit } from '@angular/core'
cd83ea1b
C
2
3@Component({
4 selector: 'my-delete-button',
5 styleUrls: [ './button.component.scss' ],
6 templateUrl: './delete-button.component.html'
7})
8
8c6781e9 9export class DeleteButtonComponent implements OnInit {
eacb25c4 10 @Input() label: string
30814423 11 @Input() title: string
faf7eab7 12 @Input() responsiveLabel = false
8c6781e9 13
8c6781e9 14 ngOnInit () {
30814423
K
15 // <my-delete-button /> No label
16 if (this.label === undefined && !this.title) {
66357162 17 this.title = $localize`Delete`
30814423
K
18 }
19
20 // <my-delete-button label /> Use default label
21 if (this.label === '') {
66357162 22 this.label = $localize`Delete`
30814423
K
23
24 if (!this.title) {
25 this.title = this.label
26 }
27 }
60709df5 28 }
cd83ea1b 29}