]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+videos/+video-edit/video-add.component.ts
Display user quota progress bars above upload form (#2981)
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-edit / video-add.component.ts
index 5bd7688092020553001626b29f52321d9d606749..016791d59dc76576c343ba767cbc3055fd9dc6ec 100644 (file)
@@ -1,5 +1,5 @@
 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'
@@ -15,6 +15,8 @@ export class VideoAddComponent implements OnInit, CanComponentDeactivate {
   @ViewChild('videoImportUrl') videoImportUrl: VideoImportUrlComponent
   @ViewChild('videoImportTorrent') videoImportTorrent: VideoImportTorrentComponent
 
+  user: User = null
+
   secondStepType: 'upload' | 'import-url' | 'import-torrent'
   videoName: string
   serverConfig: ServerConfig
@@ -24,7 +26,13 @@ export class VideoAddComponent implements OnInit, CanComponentDeactivate {
     private serverService: ServerService
   ) {}
 
+  get userInformationLoaded () {
+    return this.auth.userInformationLoaded
+  }
+
   ngOnInit () {
+    this.user = this.auth.getUser()
+
     this.serverConfig = this.serverService.getTmpConfig()
 
     this.serverService.getConfig()