diff options
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.ts | 8 |
1 files changed, 5 insertions, 3 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 016791d59..94e85efc1 100644 --- a/client/src/app/+videos/+video-edit/video-add.component.ts +++ b/client/src/app/+videos/+video-edit/video-add.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Component, HostListener, OnInit, ViewChild } from '@angular/core' | 1 | import { Component, HostListener, OnInit, ViewChild } from '@angular/core' |
2 | import { AuthService, CanComponentDeactivate, ServerService, User } from '@app/core' | 2 | import { AuthService, AuthUser, CanComponentDeactivate, ServerService } from '@app/core' |
3 | import { ServerConfig } from '@shared/models' | 3 | import { ServerConfig } from '@shared/models' |
4 | import { VideoImportTorrentComponent } from './video-add-components/video-import-torrent.component' | 4 | import { VideoImportTorrentComponent } from './video-add-components/video-import-torrent.component' |
5 | import { VideoImportUrlComponent } from './video-add-components/video-import-url.component' | 5 | import { VideoImportUrlComponent } from './video-add-components/video-import-url.component' |
@@ -15,7 +15,7 @@ export class VideoAddComponent implements OnInit, CanComponentDeactivate { | |||
15 | @ViewChild('videoImportUrl') videoImportUrl: VideoImportUrlComponent | 15 | @ViewChild('videoImportUrl') videoImportUrl: VideoImportUrlComponent |
16 | @ViewChild('videoImportTorrent') videoImportTorrent: VideoImportTorrentComponent | 16 | @ViewChild('videoImportTorrent') videoImportTorrent: VideoImportTorrentComponent |
17 | 17 | ||
18 | user: User = null | 18 | user: AuthUser = null |
19 | 19 | ||
20 | secondStepType: 'upload' | 'import-url' | 'import-torrent' | 20 | secondStepType: 'upload' | 'import-url' | 'import-torrent' |
21 | videoName: string | 21 | videoName: string |
@@ -37,6 +37,8 @@ export class VideoAddComponent implements OnInit, CanComponentDeactivate { | |||
37 | 37 | ||
38 | this.serverService.getConfig() | 38 | this.serverService.getConfig() |
39 | .subscribe(config => this.serverConfig = config) | 39 | .subscribe(config => this.serverConfig = config) |
40 | |||
41 | this.user = this.auth.getUser() | ||
40 | } | 42 | } |
41 | 43 | ||
42 | onFirstStepDone (type: 'upload' | 'import-url' | 'import-torrent', videoName: string) { | 44 | onFirstStepDone (type: 'upload' | 'import-url' | 'import-torrent', videoName: string) { |
@@ -80,6 +82,6 @@ export class VideoAddComponent implements OnInit, CanComponentDeactivate { | |||
80 | } | 82 | } |
81 | 83 | ||
82 | isRootUser () { | 84 | isRootUser () { |
83 | return this.auth.getUser().username === 'root' | 85 | return this.user.username === 'root' |
84 | } | 86 | } |
85 | } | 87 | } |