aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/buttons
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-10-03 10:02:55 +0200
committerChocobozzz <me@florianbigard.com>2018-10-03 10:02:55 +0200
commit60709df53602def422e8c32509c27c65b52cb1bd (patch)
tree83ec16f4204fe00c4368083a64b3050775f08a74 /client/src/app/shared/buttons
parent38d937002a731ecc8edc6b81018e27663580ee96 (diff)
downloadPeerTube-60709df53602def422e8c32509c27c65b52cb1bd.tar.gz
PeerTube-60709df53602def422e8c32509c27c65b52cb1bd.tar.zst
PeerTube-60709df53602def422e8c32509c27c65b52cb1bd.zip
Fix Delete title button
Diffstat (limited to 'client/src/app/shared/buttons')
-rw-r--r--client/src/app/shared/buttons/delete-button.component.html2
-rw-r--r--client/src/app/shared/buttons/delete-button.component.ts7
-rw-r--r--client/src/app/shared/buttons/edit-button.component.html2
3 files changed, 9 insertions, 2 deletions
diff --git a/client/src/app/shared/buttons/delete-button.component.html b/client/src/app/shared/buttons/delete-button.component.html
index 792490219..6c55d8104 100644
--- a/client/src/app/shared/buttons/delete-button.component.html
+++ b/client/src/app/shared/buttons/delete-button.component.html
@@ -1,4 +1,4 @@
1<span class="action-button action-button-delete" [title]="label" role="button"> 1<span class="action-button action-button-delete" [title]="getTitle()" role="button">
2 <span class="icon icon-delete-grey"></span> 2 <span class="icon icon-delete-grey"></span>
3 3
4 <span class="button-label" *ngIf="label">{{ label }}</span> 4 <span class="button-label" *ngIf="label">{{ label }}</span>
diff --git a/client/src/app/shared/buttons/delete-button.component.ts b/client/src/app/shared/buttons/delete-button.component.ts
index cd2bcccdf..8e285d982 100644
--- a/client/src/app/shared/buttons/delete-button.component.ts
+++ b/client/src/app/shared/buttons/delete-button.component.ts
@@ -1,4 +1,5 @@
1import { Component, Input } from '@angular/core' 1import { Component, Input } from '@angular/core'
2import { I18n } from '@ngx-translate/i18n-polyfill'
2 3
3@Component({ 4@Component({
4 selector: 'my-delete-button', 5 selector: 'my-delete-button',
@@ -8,4 +9,10 @@ import { Component, Input } from '@angular/core'
8 9
9export class DeleteButtonComponent { 10export class DeleteButtonComponent {
10 @Input() label: string 11 @Input() label: string
12
13 constructor (private i18n: I18n) { }
14
15 getTitle () {
16 return this.label || this.i18n('Delete')
17 }
11} 18}
diff --git a/client/src/app/shared/buttons/edit-button.component.html b/client/src/app/shared/buttons/edit-button.component.html
index 7efc54ce7..cecb780f3 100644
--- a/client/src/app/shared/buttons/edit-button.component.html
+++ b/client/src/app/shared/buttons/edit-button.component.html
@@ -1,4 +1,4 @@
1<a class="action-button action-button-edit" [routerLink]="routerLink" title="Edit"> 1<a class="action-button action-button-edit" [routerLink]="routerLink" i18n-title title="Edit">
2 <span class="icon icon-edit"></span> 2 <span class="icon icon-edit"></span>
3 3
4 <span class="button-label" *ngIf="label">{{ label }}</span> 4 <span class="button-label" *ngIf="label">{{ label }}</span>