aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main/buttons/delete-button.component.ts
diff options
context:
space:
mode:
authorKim <1877318+kimsible@users.noreply.github.com>2020-07-31 11:30:57 +0200
committerGitHub <noreply@github.com>2020-07-31 11:30:57 +0200
commit30814423ae98b6ac5f7407fc53cffe32aae57124 (patch)
tree8cc300366fdf2c6dc8e3dfc4c1e6c079dfd11571 /client/src/app/shared/shared-main/buttons/delete-button.component.ts
parent8d987ec63e6888c839ad55938d45809869c517c6 (diff)
downloadPeerTube-30814423ae98b6ac5f7407fc53cffe32aae57124.tar.gz
PeerTube-30814423ae98b6ac5f7407fc53cffe32aae57124.tar.zst
PeerTube-30814423ae98b6ac5f7407fc53cffe32aae57124.zip
Improve (accessibility title) and move action-buttons on left in tables (#2980)
* Improve and move action-buttons on left in tables * Focus on my-delete and my-button * Correct spaces syntax * Move user-action dropdown on the left Co-authored-by: kimsible <kimsible@users.noreply.github.com>
Diffstat (limited to 'client/src/app/shared/shared-main/buttons/delete-button.component.ts')
-rw-r--r--client/src/app/shared/shared-main/buttons/delete-button.component.ts17
1 files changed, 14 insertions, 3 deletions
diff --git a/client/src/app/shared/shared-main/buttons/delete-button.component.ts b/client/src/app/shared/shared-main/buttons/delete-button.component.ts
index 39e31900f..aced0f881 100644
--- a/client/src/app/shared/shared-main/buttons/delete-button.component.ts
+++ b/client/src/app/shared/shared-main/buttons/delete-button.component.ts
@@ -9,12 +9,23 @@ import { I18n } from '@ngx-translate/i18n-polyfill'
9 9
10export class DeleteButtonComponent implements OnInit { 10export class DeleteButtonComponent implements OnInit {
11 @Input() label: string 11 @Input() label: string
12 12 @Input() title: string
13 title: string
14 13
15 constructor (private i18n: I18n) { } 14 constructor (private i18n: I18n) { }
16 15
17 ngOnInit () { 16 ngOnInit () {
18 this.title = this.label || this.i18n('Delete') 17 // <my-delete-button /> No label
18 if (this.label === undefined && !this.title) {
19 this.title = this.i18n('Delete')
20 }
21
22 // <my-delete-button label /> Use default label
23 if (this.label === '') {
24 this.label = this.i18n('Delete')
25
26 if (!this.title) {
27 this.title = this.label
28 }
29 }
19 } 30 }
20} 31}