aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos
diff options
context:
space:
mode:
authorKim <1877318+kimsible@users.noreply.github.com>2020-07-24 08:53:25 +0200
committerGitHub <noreply@github.com>2020-07-24 08:53:25 +0200
commit2e7f262724dd64a209e0bad5930ba29bb4f801c3 (patch)
treeae722bf8df3331442a5f9eaa34eb5c12db21f6cf /client/src/app/+videos
parentb40a219338fed042072decea203838ca5e2b265f (diff)
downloadPeerTube-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')
-rw-r--r--client/src/app/+videos/+video-edit/video-add.component.html2
-rw-r--r--client/src/app/+videos/+video-edit/video-add.component.scss6
-rw-r--r--client/src/app/+videos/+video-edit/video-add.component.ts10
3 files changed, 14 insertions, 4 deletions
diff --git a/client/src/app/+videos/+video-edit/video-add.component.html b/client/src/app/+videos/+video-edit/video-add.component.html
index 79bfc6e5c..5690ac37f 100644
--- a/client/src/app/+videos/+video-edit/video-add.component.html
+++ b/client/src/app/+videos/+video-edit/video-add.component.html
@@ -5,6 +5,8 @@
5 Instead, <a routerLink="/admin/users">create a dedicated account</a> to upload your videos. 5 Instead, <a routerLink="/admin/users">create a dedicated account</a> to upload your videos.
6 </div> 6 </div>
7 7
8 <my-user-quota *ngIf="!isInSecondStep()" [user]="user" [userInformationLoaded]="userInformationLoaded"></my-user-quota>
9
8 <div class="title-page title-page-single" *ngIf="isInSecondStep()"> 10 <div class="title-page title-page-single" *ngIf="isInSecondStep()">
9 <ng-container *ngIf="secondStepType === 'import-url' || secondStepType === 'import-torrent'" i18n>Import {{ videoName }}</ng-container> 11 <ng-container *ngIf="secondStepType === 'import-url' || secondStepType === 'import-torrent'" i18n>Import {{ videoName }}</ng-container>
10 <ng-container *ngIf="secondStepType === 'upload'" i18n>Upload {{ videoName }}</ng-container> 12 <ng-container *ngIf="secondStepType === 'upload'" i18n>Upload {{ videoName }}</ng-container>
diff --git a/client/src/app/+videos/+video-edit/video-add.component.scss b/client/src/app/+videos/+video-edit/video-add.component.scss
index b9fef9fce..f9977bda0 100644
--- a/client/src/app/+videos/+video-edit/video-add.component.scss
+++ b/client/src/app/+videos/+video-edit/video-add.component.scss
@@ -7,7 +7,7 @@ $border-color: #EAEAEA;
7$nav-link-height: 40px; 7$nav-link-height: 40px;
8 8
9.margin-content { 9.margin-content {
10 padding-top: 50px; 10 padding-top: 20px;
11} 11}
12 12
13.alert { 13.alert {
@@ -16,7 +16,7 @@ $nav-link-height: 40px;
16 16
17::ng-deep .video-add-nav { 17::ng-deep .video-add-nav {
18 border-bottom: $border-width $border-type $border-color; 18 border-bottom: $border-width $border-type $border-color;
19 margin: 50px 0 0 0 !important; 19 margin: 20px 0 0 0 !important;
20 20
21 &.hide-nav { 21 &.hide-nav {
22 display: none !important; 22 display: none !important;
@@ -64,7 +64,7 @@ $nav-link-height: 40px;
64 padding-bottom: 20px; 64 padding-bottom: 20px;
65 display: flex; 65 display: flex;
66 justify-content: center; 66 justify-content: center;
67 align-items: center; 67 padding-top: 20px;
68 68
69 &.dragover { 69 &.dragover {
70 border: 3px dashed pvar(--mainColor); 70 border: 3px dashed pvar(--mainColor);
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 @@
1import { Component, HostListener, OnInit, ViewChild } from '@angular/core' 1import { Component, HostListener, OnInit, ViewChild } from '@angular/core'
2import { AuthService, CanComponentDeactivate, ServerService } from '@app/core' 2import { AuthService, CanComponentDeactivate, ServerService, User } from '@app/core'
3import { ServerConfig } from '@shared/models' 3import { ServerConfig } from '@shared/models'
4import { VideoImportTorrentComponent } from './video-add-components/video-import-torrent.component' 4import { VideoImportTorrentComponent } from './video-add-components/video-import-torrent.component'
5import { VideoImportUrlComponent } from './video-add-components/video-import-url.component' 5import { 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()