aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-edit/video-add.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos/+video-edit/video-add.component.ts')
-rw-r--r--client/src/app/videos/+video-edit/video-add.component.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/client/src/app/videos/+video-edit/video-add.component.ts b/client/src/app/videos/+video-edit/video-add.component.ts
index 73efd60bf..58eccef48 100644
--- a/client/src/app/videos/+video-edit/video-add.component.ts
+++ b/client/src/app/videos/+video-edit/video-add.component.ts
@@ -12,6 +12,7 @@ import { ValidatorMessage } from '../../shared/forms/form-validators/validator-m
12import { populateAsyncUserVideoChannels } from '../../shared/misc/utils' 12import { populateAsyncUserVideoChannels } from '../../shared/misc/utils'
13import { VideoEdit } from '../../shared/video/video-edit.model' 13import { VideoEdit } from '../../shared/video/video-edit.model'
14import { VideoService } from '../../shared/video/video.service' 14import { VideoService } from '../../shared/video/video.service'
15import { CanComponentDeactivate } from '@app/shared/can-deactivate-guard.service'
15 16
16@Component({ 17@Component({
17 selector: 'my-videos-add', 18 selector: 'my-videos-add',
@@ -22,7 +23,7 @@ import { VideoService } from '../../shared/video/video.service'
22 ] 23 ]
23}) 24})
24 25
25export class VideoAddComponent extends FormReactive implements OnInit { 26export class VideoAddComponent extends FormReactive implements OnInit, CanComponentDeactivate {
26 @ViewChild('videofileInput') videofileInput 27 @ViewChild('videofileInput') videofileInput
27 28
28 isUploadingVideo = false 29 isUploadingVideo = false
@@ -84,6 +85,10 @@ export class VideoAddComponent extends FormReactive implements OnInit {
84 }) 85 })
85 } 86 }
86 87
88 canDeactivate () {
89 return !this.isUploadingVideo
90 }
91
87 fileChange () { 92 fileChange () {
88 this.uploadFirstStep() 93 this.uploadFirstStep()
89 } 94 }