diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-07-23 21:30:04 +0200 |
---|---|---|
committer | Rigel Kent <par@rigelk.eu> | 2020-07-29 18:15:53 +0200 |
commit | 4f5d045960b042eb27e10bac1bdaf1c074c9fa2a (patch) | |
tree | 09e1e8cce0a2e64146ede51941cfa2f1bdcf3c2f /client/src/app/+my-account/my-account-video-imports | |
parent | bc99dfe54e093e69ba8fd06d36b36fbbda3f45de (diff) | |
download | PeerTube-4f5d045960b042eb27e10bac1bdaf1c074c9fa2a.tar.gz PeerTube-4f5d045960b042eb27e10bac1bdaf1c074c9fa2a.tar.zst PeerTube-4f5d045960b042eb27e10bac1bdaf1c074c9fa2a.zip |
harmonize search for libraries
Diffstat (limited to 'client/src/app/+my-account/my-account-video-imports')
3 files changed, 24 insertions, 2 deletions
diff --git a/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.html b/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.html index 98a2039cc..854126443 100644 --- a/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.html +++ b/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.html | |||
@@ -45,7 +45,12 @@ | |||
45 | <ng-container *ngIf="isVideoImportFailed(videoImport)"></ng-container> | 45 | <ng-container *ngIf="isVideoImportFailed(videoImport)"></ng-container> |
46 | </td> | 46 | </td> |
47 | 47 | ||
48 | <td>{{ videoImport.state.label }}</td> | 48 | <td> |
49 | <span class="badge" [ngClass]="getVideoImportStateClass(videoImport.state)"> | ||
50 | {{ videoImport.state.label }} | ||
51 | </span> | ||
52 | </td> | ||
53 | |||
49 | <td>{{ videoImport.createdAt | date: 'short' }}</td> | 54 | <td>{{ videoImport.createdAt | date: 'short' }}</td> |
50 | 55 | ||
51 | <td class="action-cell"> | 56 | <td class="action-cell"> |
diff --git a/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.scss b/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.scss index bdd2f8270..a93c28028 100644 --- a/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.scss +++ b/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.scss | |||
@@ -7,4 +7,8 @@ pre { | |||
7 | 7 | ||
8 | .video-import-error { | 8 | .video-import-error { |
9 | color: red; | 9 | color: red; |
10 | } \ No newline at end of file | 10 | } |
11 | |||
12 | .badge { | ||
13 | @include table-badge; | ||
14 | } | ||
diff --git a/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.ts b/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.ts index 42ddb0ee2..9dd5ef142 100644 --- a/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.ts +++ b/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.ts | |||
@@ -30,6 +30,19 @@ export class MyAccountVideoImportsComponent extends RestTable implements OnInit | |||
30 | return 'MyAccountVideoImportsComponent' | 30 | return 'MyAccountVideoImportsComponent' |
31 | } | 31 | } |
32 | 32 | ||
33 | getVideoImportStateClass (state: VideoImportState) { | ||
34 | switch (state) { | ||
35 | case VideoImportState.FAILED: | ||
36 | return 'badge-red' | ||
37 | case VideoImportState.REJECTED: | ||
38 | return 'badge-banned' | ||
39 | case VideoImportState.PENDING: | ||
40 | return 'badge-yellow' | ||
41 | default: | ||
42 | return 'badge-green' | ||
43 | } | ||
44 | } | ||
45 | |||
33 | isVideoImportSuccess (videoImport: VideoImport) { | 46 | isVideoImportSuccess (videoImport: VideoImport) { |
34 | return videoImport.state.id === VideoImportState.SUCCESS | 47 | return videoImport.state.id === VideoImportState.SUCCESS |
35 | } | 48 | } |