diff options
author | Kim <1877318+kimsible@users.noreply.github.com> | 2020-07-24 08:53:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-24 08:53:25 +0200 |
commit | 2e7f262724dd64a209e0bad5930ba29bb4f801c3 (patch) | |
tree | ae722bf8df3331442a5f9eaa34eb5c12db21f6cf /client/src/app/+videos/+video-edit/video-add.component.ts | |
parent | b40a219338fed042072decea203838ca5e2b265f (diff) | |
download | PeerTube-2e7f262724dd64a209e0bad5930ba29bb4f801c3.tar.gz PeerTube-2e7f262724dd64a209e0bad5930ba29bb4f801c3.tar.zst PeerTube-2e7f262724dd64a209e0bad5930ba29bb4f801c3.zip |
Display user quota progress bars above upload form (#2981)
* Move user-quota to my-user-quota shared component
* Add user-quota to upload form
* Increase progress bar height and make it focusable
* Correct syntax parenthesis
* Add explicit title to user-quota bars + tooltip with quota values
* Hide user-quota in second upload step
* Customize focus styles on user-quota
Co-authored-by: kimsible <kimsible@users.noreply.github.com>
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 | 10 |
1 files changed, 9 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 5bd768809..016791d59 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 } from '@app/core' | 2 | import { AuthService, CanComponentDeactivate, ServerService, User } 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,6 +15,8 @@ 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 | ||
19 | |||
18 | secondStepType: 'upload' | 'import-url' | 'import-torrent' | 20 | secondStepType: 'upload' | 'import-url' | 'import-torrent' |
19 | videoName: string | 21 | videoName: string |
20 | serverConfig: ServerConfig | 22 | serverConfig: ServerConfig |
@@ -24,7 +26,13 @@ export class VideoAddComponent implements OnInit, CanComponentDeactivate { | |||
24 | private serverService: ServerService | 26 | private serverService: ServerService |
25 | ) {} | 27 | ) {} |
26 | 28 | ||
29 | get userInformationLoaded () { | ||
30 | return this.auth.userInformationLoaded | ||
31 | } | ||
32 | |||
27 | ngOnInit () { | 33 | ngOnInit () { |
34 | this.user = this.auth.getUser() | ||
35 | |||
28 | this.serverConfig = this.serverService.getTmpConfig() | 36 | this.serverConfig = this.serverService.getTmpConfig() |
29 | 37 | ||
30 | this.serverService.getConfig() | 38 | this.serverService.getConfig() |