X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fbuttons%2Fdelete-button.component.ts;h=39e31900fa3998423dba23683688bfc3b554575b;hb=b5f919ac8eb2a1c20e26582fdfd377d687710d8f;hp=8e285d98282616e398504245c6e63bacc71338f5;hpb=60709df53602def422e8c32509c27c65b52cb1bd;p=oweals%2Fpeertube.git diff --git a/client/src/app/shared/buttons/delete-button.component.ts b/client/src/app/shared/buttons/delete-button.component.ts index 8e285d982..39e31900f 100644 --- a/client/src/app/shared/buttons/delete-button.component.ts +++ b/client/src/app/shared/buttons/delete-button.component.ts @@ -1,4 +1,4 @@ -import { Component, Input } from '@angular/core' +import { Component, Input, OnInit } from '@angular/core' import { I18n } from '@ngx-translate/i18n-polyfill' @Component({ @@ -7,12 +7,14 @@ import { I18n } from '@ngx-translate/i18n-polyfill' templateUrl: './delete-button.component.html' }) -export class DeleteButtonComponent { +export class DeleteButtonComponent implements OnInit { @Input() label: string + title: string + constructor (private i18n: I18n) { } - getTitle () { - return this.label || this.i18n('Delete') + ngOnInit () { + this.title = this.label || this.i18n('Delete') } }