From e61151b01c80e525db068ff12fcfe2c8ae04e1a4 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Fri, 13 Mar 2020 20:38:50 +0100 Subject: Replace p-progressbar and bootstrap progressbar with pure CSS alt --- .../video-add-components/video-send.scss | 4 +- .../video-upload.component.html | 10 +++-- .../video-upload.component.scss | 44 +++++++--------------- .../src/app/videos/+video-edit/video-add.module.ts | 2 - 4 files changed, 21 insertions(+), 39 deletions(-) (limited to 'client/src/app/videos') diff --git a/client/src/app/videos/+video-edit/video-add-components/video-send.scss b/client/src/app/videos/+video-edit/video-add-components/video-send.scss index 8769dd302..1979d0061 100644 --- a/client/src/app/videos/+video-edit/video-add-components/video-send.scss +++ b/client/src/app/videos/+video-edit/video-add-components/video-send.scss @@ -41,9 +41,7 @@ $width-size: 190px; } .button-file { - @include peertube-button-file(auto); - - min-width: 190px; + @include peertube-button-file(max-content); } .button-file-extension { diff --git a/client/src/app/videos/+video-edit/video-add-components/video-upload.component.html b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.html index bdbc2a2cb..3cb57e375 100644 --- a/client/src/app/videos/+video-edit/video-add-components/video-upload.component.html +++ b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.html @@ -51,10 +51,12 @@
- +
+
+ Processing… + {{ videoUploadPercents }}% +
+
diff --git a/client/src/app/videos/+video-edit/video-add-components/video-upload.component.scss b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.scss index b5628e276..95baa3d0a 100644 --- a/client/src/app/videos/+video-edit/video-add-components/video-upload.component.scss +++ b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.scss @@ -22,37 +22,21 @@ margin-top: 25px; margin-bottom: 40px; - p-progressBar { + .progress { + @include progressbar; flex-grow: 1; - - ::ng-deep .ui-progressbar { - font-size: 15px !important; - 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; - color: #fff !important; - line-height: 30px !important; - } - } - - &.processing { - ::ng-deep .ui-progressbar-label { - // Same color as background to hide "100%" - color: rgba(11, 204, 41, 0.16) !important; - - &::before { - content: 'Processing...'; - color: #fff; - } + height: 30px; + font-size: 15px; + background-color: rgba(11, 204, 41, 0.16); + + .progress-bar { + background-color: $green; + line-height: 30px; + text-align: left; + font-weight: $font-bold; + + span { + margin-left: 18px; } } } diff --git a/client/src/app/videos/+video-edit/video-add.module.ts b/client/src/app/videos/+video-edit/video-add.module.ts index 870f7cb97..4386f10b6 100644 --- a/client/src/app/videos/+video-edit/video-add.module.ts +++ b/client/src/app/videos/+video-edit/video-add.module.ts @@ -7,14 +7,12 @@ import { CanDeactivateGuard } from '../../shared/guards/can-deactivate-guard.ser import { VideoUploadComponent } from '@app/videos/+video-edit/video-add-components/video-upload.component' import { VideoImportUrlComponent } from '@app/videos/+video-edit/video-add-components/video-import-url.component' import { VideoImportTorrentComponent } from '@app/videos/+video-edit/video-add-components/video-import-torrent.component' -import { ProgressBarModule } from 'primeng/progressbar' @NgModule({ imports: [ VideoAddRoutingModule, VideoEditModule, SharedModule, - ProgressBarModule ], declarations: [ VideoAddComponent, -- cgit v1.2.3