From: Rigel Kent Date: Fri, 13 Mar 2020 00:29:11 +0000 (+0100) Subject: More modern avatar upload, quota represented with progress bars X-Git-Tag: v2.2.0-rc.1~369 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=df8914c9a2d6dbb435460b9e252a771cac47880b;p=oweals%2Fpeertube.git More modern avatar upload, quota represented with progress bars --- 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 ddcde828c..6fee087fb 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 @@ -8,13 +8,17 @@
- - {{ userVideoQuotaUsed | bytes: 0 }} used / {{ userVideoQuota }} +
+
{{ userVideoQuotaUsed | bytes: 0 }}
+ {{ userVideoQuota }} +
-
- - {{ userVideoQuotaUsedDaily | bytes: 0 }} used / {{ userVideoQuotaDaily }} +
+
+
{{ 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 7eb60c7fb..2b90cc8cf 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 @@ -13,3 +13,7 @@ .account-title { @include settings-big-title; } + +.progress { + width: 500px; +} diff --git a/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts index ada98401c..5f2db9854 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts @@ -17,9 +17,11 @@ export class MyAccountSettingsComponent implements OnInit, AfterViewChecked { userVideoQuota = '0' userVideoQuotaUsed = 0 + userVideoQuotaPercentage = 15 userVideoQuotaDaily = '0' userVideoQuotaUsedDaily = 0 + userVideoQuotaDailyPercentage = 15 constructor ( private viewportScroller: ViewportScroller, @@ -40,12 +42,14 @@ export class MyAccountSettingsComponent implements OnInit, AfterViewChecked { () => { if (this.user.videoQuota !== -1) { this.userVideoQuota = new BytesPipe().transform(this.user.videoQuota, 0).toString() + this.userVideoQuotaPercentage = this.user.videoQuota * 100 / this.userVideoQuotaUsed } else { this.userVideoQuota = this.i18n('Unlimited') } if (this.user.videoQuotaDaily !== -1) { this.userVideoQuotaDaily = new BytesPipe().transform(this.user.videoQuotaDaily, 0).toString() + this.userVideoQuotaDailyPercentage = this.user.videoQuotaDaily * 100 / this.userVideoQuotaUsedDaily } else { this.userVideoQuotaDaily = this.i18n('Unlimited') } 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 8bdff2f5a..b992d0ebd 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 @@ -2,6 +2,13 @@
Avatar +
+
+ + +
+
+
{{ actor.displayName }}
@@ -10,10 +17,4 @@
{{ actor.followersCount }} subscribers
- -
- Change the avatar - -
-
(extensions: {{ avatarExtensions }}, max size: {{ maxAvatarSize | bytes }})
\ No newline at end of file diff --git a/client/src/app/+my-account/shared/actor-avatar-info.component.scss b/client/src/app/+my-account/shared/actor-avatar-info.component.scss index 86f8108b9..5a66ecfd2 100644 --- a/client/src/app/+my-account/shared/actor-avatar-info.component.scss +++ b/client/src/app/+my-account/shared/actor-avatar-info.component.scss @@ -5,12 +5,42 @@ display: flex; img { - @include avatar(50px); + @include avatar(100px); margin-right: 15px; } + .actor-img-edit-container { + position: relative; + width: 0; + + .actor-img-edit-button { + @include peertube-button-file(21px); + @include button-with-icon(19px); + + margin-top: 10px; + margin-bottom: 5px; + border-radius: 50%; + top: 55px; + right: 45px; + cursor: pointer; + + input { + width: 30px; + height: 30px; + } + + my-global-icon { + right: 7px; + } + } + } + .actor-info { + justify-content: center; + display: inline-flex; + flex-direction: column; + .actor-info-names { display: flex; align-items: center; @@ -35,21 +65,7 @@ .actor-info-followers { font-size: 15px; + padding-bottom: .5rem; } } } - -.button-file { - @include peertube-button-file(160px); - - margin-top: 10px; - margin-bottom: 5px; -} - -.file-max-size { - display: inline-block; - font-size: 13px; - - position: relative; - top: -10px; -} 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 0f904affb..bdbc2a2cb 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 @@ -68,7 +68,7 @@
-
+