aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+my-account/my-account-ownership/my-account-ownership.component.ts')
-rw-r--r--client/src/app/+my-account/my-account-ownership/my-account-ownership.component.ts13
1 files changed, 12 insertions, 1 deletions
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 }