</tab>
<tab *ngIf="isVideoImportEnabled()" i18n-heading heading="Import with URL">
- <my-video-import #videoImport (firstStepDone)="onFirstStepDone('import', $event)"></my-video-import>
+ <my-video-import-url #videoImportUrl (firstStepDone)="onFirstStepDone('import-url', $event)"></my-video-import-url>
</tab>
</tabset>
</div>
import { Component, ViewChild } from '@angular/core'
import { CanComponentDeactivate } from '@app/shared/guards/can-deactivate-guard.service'
-import { VideoImportComponent } from '@app/videos/+video-edit/video-import.component'
+import { VideoImportUrlComponent } from '@app/videos/+video-edit/video-import-url.component'
import { VideoUploadComponent } from '@app/videos/+video-edit/video-upload.component'
import { ServerService } from '@app/core'
})
export class VideoAddComponent implements CanComponentDeactivate {
@ViewChild('videoUpload') videoUpload: VideoUploadComponent
- @ViewChild('videoImport') videoImport: VideoImportComponent
+ @ViewChild('videoImportUrl') videoImportUrl: VideoImportUrlComponent
- secondStepType: 'upload' | 'import'
+ secondStepType: 'upload' | 'import-url'
videoName: string
constructor (
private serverService: ServerService
) {}
- onFirstStepDone (type: 'upload' | 'import', videoName: string) {
+ onFirstStepDone (type: 'upload' | 'import-url', videoName: string) {
this.secondStepType = type
this.videoName = videoName
}
canDeactivate () {
if (this.secondStepType === 'upload') return this.videoUpload.canDeactivate()
- if (this.secondStepType === 'import') return this.videoImport.canDeactivate()
+ if (this.secondStepType === 'import-url') return this.videoImportUrl.canDeactivate()
return { canDeactivate: true }
}
import { VideoAddComponent } from './video-add.component'
import { CanDeactivateGuard } from '../../shared/guards/can-deactivate-guard.service'
import { VideoUploadComponent } from '@app/videos/+video-edit/video-upload.component'
-import { VideoImportComponent } from '@app/videos/+video-edit/video-import.component'
+import { VideoImportUrlComponent } from '@app/videos/+video-edit/video-import-url.component'
@NgModule({
imports: [
declarations: [
VideoAddComponent,
VideoUploadComponent,
- VideoImportComponent
+ VideoImportUrlComponent
],
exports: [
VideoAddComponent
import { VideoSend } from '@app/videos/+video-edit/shared/video-send'
@Component({
- selector: 'my-video-import',
- templateUrl: './video-import.component.html',
+ selector: 'my-video-import-url',
+ templateUrl: './video-import-url.component.html',
styleUrls: [
'./shared/video-edit.component.scss',
- './video-import.component.scss'
+ './video-import-url.component.scss'
]
})
-export class VideoImportComponent extends VideoSend implements OnInit, CanComponentDeactivate {
+export class VideoImportUrlComponent extends VideoSend implements OnInit, CanComponentDeactivate {
@Output() firstStepDone = new EventEmitter<string>()
targetUrl = ''