ActivityPub-federated video streaming platform using P2P directly in your web browser
Add style to cancel button
Chocobozzze494f91e6798
diff --git a/client/src/app/videos/+video-edit/video-add.component.html b/client/src/app/videos/+video-edit/video-add.component.htmlindex 4e9b78cf29..a3a41aa126 100644--- a/client/src/app/videos/+video-edit/video-add.component.html+++ b/client/src/app/videos/+video-edit/video-add.component.html@@ -32,17 +32,15 @@</div></div>- <div- *ngIf="isUploadingVideo"- >+ <div *ngIf="isUploadingVideo" class="upload-progress-cancel"><p-progressBar[value]="videoUploadPercents"[ngClass]="{ processing: videoUploadPercents === 100 && videoUploaded === false }"></p-progressBar>- <input type="button" value="Cancel" (click)="cancelUpload()" />+ <input *ngIf="videoUploaded === false" type="button" value="Cancel" (click)="cancelUpload()" /></div>- <!-- Hidden because we need to load the component -->+ <!-- Hidden because we want to load the component --><form [hidden]="!isUploadingVideo" novalidate [formGroup]="form"><my-video-edit[form]="form" [formErrors]="formErrors"diff --git a/client/src/app/videos/+video-edit/video-add.component.scss b/client/src/app/videos/+video-edit/video-add.component.scssindex 4bb5090095..0c74552d38 100644--- a/client/src/app/videos/+video-edit/video-add.component.scss+++ b/client/src/app/videos/+video-edit/video-add.component.scss@@ -41,39 +41,51 @@}}-p-progressBar {- /deep/ .ui-progressbar {- margin-top: 25px !important;- margin-bottom: 40px !important;- font-size: 15px !important;- color: #fff !important;- height: 30px !important;- line-height: 30px !important;- border-radius: 3px !important;- background-color: rgba(11, 204, 41, 0.16) !important;-- .ui-progressbar-value {- background-color: #0BCC29 !important;- }+.upload-progress-cancel {+ display: flex;+ margin-top: 25px;+ margin-bottom: 40px;++ p-progressBar {+ flex-grow: 1;++ /deep/ .ui-progressbar {+ font-size: 15px !important;+ color: #fff !important;+ height: 30px !important;+ line-height: 30px !important;+ border-radius: 3px !important;+ background-color: rgba(11, 204, 41, 0.16) !important;++ .ui-progressbar-value {+ background-color: #0BCC29 !important;+ }- .ui-progressbar-label {- text-align: left;- padding-left: 18px;- margin-top: 0 !important;+ .ui-progressbar-label {+ text-align: left;+ padding-left: 18px;+ margin-top: 0 !important;+ }}- }- &.processing {- /deep/ .ui-progressbar-label {- // Same color as background to hide "100%"- color: rgba(11, 204, 41, 0.16) !important;+ &.processing {+ /deep/ .ui-progressbar-label {+ // Same color as background to hide "100%"+ color: rgba(11, 204, 41, 0.16) !important;- &::before {- content: 'Processing...';- color: #fff;+ &::before {+ content: 'Processing...';+ color: #fff;+ }}}}-}+ input {+ @include peertube-button;+ @include grey-button;++ margin-left: 10px;+ }+}diff --git a/client/src/app/videos/+video-edit/video-add.component.ts b/client/src/app/videos/+video-edit/video-add.component.tsindex 6e0830ab75..73efd60bf4 100644--- a/client/src/app/videos/+video-edit/video-add.component.ts+++ b/client/src/app/videos/+video-edit/video-add.component.ts@@ -99,8 +99,8 @@ export class VideoAddComponent extends FormReactive implements OnInit {this.videoUploadObservable.unsubscribe()this.isUploadingVideo = falsethis.videoUploadPercents = 0- this.notificationsService.error('Error', 'Upload cancelled')this.videoUploadObservable = null+ this.notificationsService.info('Info', 'Upload cancelled')}}