import { Component, HostListener, OnInit, ViewChild } from '@angular/core'
-import { AuthService, CanComponentDeactivate, ServerService } from '@app/core'
+import { AuthService, CanComponentDeactivate, ServerService, User } from '@app/core'
import { ServerConfig } from '@shared/models'
import { VideoImportTorrentComponent } from './video-add-components/video-import-torrent.component'
import { VideoImportUrlComponent } from './video-add-components/video-import-url.component'
@ViewChild('videoImportUrl') videoImportUrl: VideoImportUrlComponent
@ViewChild('videoImportTorrent') videoImportTorrent: VideoImportTorrentComponent
+ user: User = null
+
secondStepType: 'upload' | 'import-url' | 'import-torrent'
videoName: string
serverConfig: ServerConfig
private serverService: ServerService
) {}
+ get userInformationLoaded () {
+ return this.auth.userInformationLoaded
+ }
+
ngOnInit () {
+ this.user = this.auth.getUser()
+
this.serverConfig = this.serverService.getTmpConfig()
this.serverService.getConfig()