diff options
author | Kim <1877318+kimsible@users.noreply.github.com> | 2020-07-31 11:30:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-31 11:30:57 +0200 |
commit | 30814423ae98b6ac5f7407fc53cffe32aae57124 (patch) | |
tree | 8cc300366fdf2c6dc8e3dfc4c1e6c079dfd11571 /client/src/app/shared/shared-main/buttons/delete-button.component.ts | |
parent | 8d987ec63e6888c839ad55938d45809869c517c6 (diff) | |
download | PeerTube-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.ts | 17 |
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 | ||
10 | export class DeleteButtonComponent implements OnInit { | 10 | export 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 | } |