aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-ownership
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+my-account/my-account-ownership')
-rw-r--r--client/src/app/+my-account/my-account-ownership/my-account-ownership.component.html6
-rw-r--r--client/src/app/+my-account/my-account-ownership/my-account-ownership.component.scss4
-rw-r--r--client/src/app/+my-account/my-account-ownership/my-account-ownership.component.ts13
3 files changed, 21 insertions, 2 deletions
diff --git a/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.html b/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.html
index be5d41f3b..4475178c7 100644
--- a/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.html
+++ b/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.html
@@ -62,7 +62,11 @@
62 </td> 62 </td>
63 63
64 <td>{{ videoChangeOwnership.createdAt | date: 'short' }}</td> 64 <td>{{ videoChangeOwnership.createdAt | date: 'short' }}</td>
65 <td i18n>{{ videoChangeOwnership.status }}</td> 65
66 <td>
67 <span class="badge" [ngClass]="getStatusClass(videoChangeOwnership.status)">{{ videoChangeOwnership.status }}</span>
68 </td>
69
66 <td class="action-cell"> 70 <td class="action-cell">
67 <ng-container *ngIf="videoChangeOwnership.status === 'WAITING'"> 71 <ng-container *ngIf="videoChangeOwnership.status === 'WAITING'">
68 <my-button i18n-label label="Accept" icon="tick" (click)="openAcceptModal(videoChangeOwnership)"></my-button> 72 <my-button i18n-label label="Accept" icon="tick" (click)="openAcceptModal(videoChangeOwnership)"></my-button>
diff --git a/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.scss b/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.scss
index c04e26374..7cac9c9f3 100644
--- a/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.scss
+++ b/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.scss
@@ -5,6 +5,10 @@
5 @include chip; 5 @include chip;
6} 6}
7 7
8.badge {
9 @include table-badge;
10}
11
8.video-table-video { 12.video-table-video {
9 display: inline-flex; 13 display: inline-flex;
10 14
diff --git a/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.ts b/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.ts
index 98360dfb3..7473470aa 100644
--- a/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.ts
+++ b/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.ts
@@ -2,7 +2,7 @@ import { SortMeta } from 'primeng/api'
2import { Component, OnInit, ViewChild } from '@angular/core' 2import { Component, OnInit, ViewChild } from '@angular/core'
3import { Notifier, RestPagination, RestTable } from '@app/core' 3import { Notifier, RestPagination, RestTable } from '@app/core'
4import { VideoOwnershipService, Actor, Video, Account } from '@app/shared/shared-main' 4import { VideoOwnershipService, Actor, Video, Account } from '@app/shared/shared-main'
5import { VideoChangeOwnership } from '@shared/models' 5import { VideoChangeOwnership, VideoChangeOwnershipStatus } from '@shared/models'
6import { MyAccountAcceptOwnershipComponent } from './my-account-accept-ownership/my-account-accept-ownership.component' 6import { MyAccountAcceptOwnershipComponent } from './my-account-accept-ownership/my-account-accept-ownership.component'
7import { getAbsoluteAPIUrl } from '@app/helpers' 7import { getAbsoluteAPIUrl } from '@app/helpers'
8 8
@@ -34,6 +34,17 @@ export class MyAccountOwnershipComponent extends RestTable implements OnInit {
34 return 'MyAccountOwnershipComponent' 34 return 'MyAccountOwnershipComponent'
35 } 35 }
36 36
37 getStatusClass (status: VideoChangeOwnershipStatus) {
38 switch (status) {
39 case VideoChangeOwnershipStatus.ACCEPTED:
40 return 'badge-green'
41 case VideoChangeOwnershipStatus.REFUSED:
42 return 'badge-red'
43 default:
44 return 'badge-yellow'
45 }
46 }
47
37 switchToDefaultAvatar ($event: Event) { 48 switchToDefaultAvatar ($event: Event) {
38 ($event.target as HTMLImageElement).src = Actor.GET_DEFAULT_AVATAR_URL() 49 ($event.target as HTMLImageElement).src = Actor.GET_DEFAULT_AVATAR_URL()
39 } 50 }