diff options
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.ts | 10 |
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 @@ | |||
1 | import { from as observableFrom, Observable } from 'rxjs' | 1 | import { from as observableFrom, Observable } from 'rxjs' |
2 | import { concatAll, tap } from 'rxjs/operators' | 2 | import { concatAll, tap } from 'rxjs/operators' |
3 | import { Component, OnDestroy, OnInit, Inject, LOCALE_ID } from '@angular/core' | 3 | import { Component, OnDestroy, OnInit, Inject, LOCALE_ID, ViewChild } from '@angular/core' |
4 | import { ActivatedRoute, Router } from '@angular/router' | 4 | import { ActivatedRoute, Router } from '@angular/router' |
5 | import { Location } from '@angular/common' | 5 | import { Location } from '@angular/common' |
6 | import { immutableAssign } from '@app/shared/misc/utils' | 6 | import { immutableAssign } from '@app/shared/misc/utils' |
@@ -14,6 +14,7 @@ import { VideoService } from '../../shared/video/video.service' | |||
14 | import { I18n } from '@ngx-translate/i18n-polyfill' | 14 | import { I18n } from '@ngx-translate/i18n-polyfill' |
15 | import { VideoPrivacy, VideoState } from '../../../../../shared/models/videos' | 15 | import { VideoPrivacy, VideoState } from '../../../../../shared/models/videos' |
16 | import { ScreenService } from '@app/shared/misc/screen.service' | 16 | import { ScreenService } from '@app/shared/misc/screen.service' |
17 | import { 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 | ||