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 --- .../my-account-settings.component.html | 2 +- .../my-account-settings.component.scss | 1 + .../my-account-video-settings.component.scss | 1 - .../+my-account/shared/actor-avatar-info.component.html | 2 +- .../+my-account/shared/actor-avatar-info.component.ts | 17 +++++++++++++++-- 5 files changed, 18 insertions(+), 5 deletions(-) (limited to 'client/src/app/+my-account') diff --git a/client/src/app/+my-account/my-account-settings/my-account-settings.component.html b/client/src/app/+my-account/my-account-settings/my-account-settings.component.html index 6fee087fb..f1c466545 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-settings.component.html +++ b/client/src/app/+my-account/my-account-settings/my-account-settings.component.html @@ -16,7 +16,7 @@
-
{{ userVideoQuotaUsedDaily | bytes: 0 }}
+
{{ userVideoQuotaUsedDaily | bytes: 0 }}
{{ userVideoQuotaDaily }}
diff --git a/client/src/app/+my-account/my-account-settings/my-account-settings.component.scss b/client/src/app/+my-account/my-account-settings/my-account-settings.component.scss index e1a00fb8b..2660c2b72 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-settings.component.scss +++ b/client/src/app/+my-account/my-account-settings/my-account-settings.component.scss @@ -15,6 +15,7 @@ } .progress { + @include progressbar; width: 500px; max-width: 100%; } diff --git a/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.scss b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.scss index 56cef0398..50da3ff37 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.scss +++ b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.scss @@ -10,7 +10,6 @@ input[type=submit] { @include peertube-button; @include orange-button; - display: block; margin-top: 15px; } diff --git a/client/src/app/+my-account/shared/actor-avatar-info.component.html b/client/src/app/+my-account/shared/actor-avatar-info.component.html index a5a435726..2050950be 100644 --- a/client/src/app/+my-account/shared/actor-avatar-info.component.html +++ b/client/src/app/+my-account/shared/actor-avatar-info.component.html @@ -3,7 +3,7 @@ Avatar
-
+
diff --git a/client/src/app/+my-account/shared/actor-avatar-info.component.ts b/client/src/app/+my-account/shared/actor-avatar-info.component.ts index eb198587d..8e4a7a602 100644 --- a/client/src/app/+my-account/shared/actor-avatar-info.component.ts +++ b/client/src/app/+my-account/shared/actor-avatar-info.component.ts @@ -4,6 +4,8 @@ import { VideoChannel } from '@app/shared/video-channel/video-channel.model' import { Account } from '@app/shared/account/account.model' import { Notifier } from '@app/core' import { ServerConfig } from '@shared/models' +import { BytesPipe } from 'ngx-pipes' +import { I18n } from '@ngx-translate/i18n-polyfill' @Component({ selector: 'my-actor-avatar-info', @@ -17,12 +19,19 @@ export class ActorAvatarInfoComponent implements OnInit { @Output() avatarChange = new EventEmitter() + maxSizeText: string + private serverConfig: ServerConfig + private bytesPipe: BytesPipe constructor ( private serverService: ServerService, - private notifier: Notifier - ) {} + private notifier: Notifier, + private i18n: I18n + ) { + this.bytesPipe = new BytesPipe() + this.maxSizeText = this.i18n('max size') + } ngOnInit (): void { this.serverConfig = this.serverService.getTmpConfig() @@ -47,6 +56,10 @@ export class ActorAvatarInfoComponent implements OnInit { return this.serverConfig.avatar.file.size.max } + get maxAvatarSizeInBytes () { + return this.bytesPipe.transform(this.maxAvatarSize) + } + get avatarExtensions () { return this.serverConfig.avatar.file.extensions.join(', ') } -- cgit v1.2.3