aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+my-account/my-account-videos/my-account-videos.component.ts')
-rw-r--r--client/src/app/+my-account/my-account-videos/my-account-videos.component.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts
index 01e1ef1da..7560f0128 100644
--- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts
+++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts
@@ -1,6 +1,6 @@
1import { from as observableFrom, Observable } from 'rxjs' 1import { from as observableFrom, Observable } from 'rxjs'
2import { concatAll, tap } from 'rxjs/operators' 2import { concatAll, tap } from 'rxjs/operators'
3import { Component, OnDestroy, OnInit, Inject, LOCALE_ID } from '@angular/core' 3import { Component, OnDestroy, OnInit, Inject, LOCALE_ID, ViewChild } from '@angular/core'
4import { ActivatedRoute, Router } from '@angular/router' 4import { ActivatedRoute, Router } from '@angular/router'
5import { Location } from '@angular/common' 5import { Location } from '@angular/common'
6import { immutableAssign } from '@app/shared/misc/utils' 6import { immutableAssign } from '@app/shared/misc/utils'
@@ -14,6 +14,7 @@ import { VideoService } from '../../shared/video/video.service'
14import { I18n } from '@ngx-translate/i18n-polyfill' 14import { I18n } from '@ngx-translate/i18n-polyfill'
15import { VideoPrivacy, VideoState } from '../../../../../shared/models/videos' 15import { VideoPrivacy, VideoState } from '../../../../../shared/models/videos'
16import { ScreenService } from '@app/shared/misc/screen.service' 16import { ScreenService } from '@app/shared/misc/screen.service'
17import { VideoChangeOwnershipComponent } from './video-change-ownership/video-change-ownership.component'
17 18
18@Component({ 19@Component({
19 selector: 'my-account-videos', 20 selector: 'my-account-videos',
@@ -33,6 +34,8 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni
33 protected baseVideoWidth = -1 34 protected baseVideoWidth = -1
34 protected baseVideoHeight = 155 35 protected baseVideoHeight = 155
35 36
37 @ViewChild('videoChangeOwnershipModal') videoChangeOwnershipModal: VideoChangeOwnershipComponent
38
36 constructor ( 39 constructor (
37 protected router: Router, 40 protected router: Router,
38 protected route: ActivatedRoute, 41 protected route: ActivatedRoute,
@@ -133,6 +136,11 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni
133 ) 136 )
134 } 137 }
135 138
139 changeOwnership (event: Event, video: Video) {
140 event.preventDefault()
141 this.videoChangeOwnershipModal.show(video)
142 }
143
136 getStateLabel (video: Video) { 144 getStateLabel (video: Video) {
137 let suffix: string 145 let suffix: string
138 146