From: Rigel Kent Date: Tue, 7 Jan 2020 23:46:38 +0000 (+0100) Subject: Add extra text to button when partially subscribed to all channels X-Git-Tag: v2.1.0-rc.1~49 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=b061c8edb053d4a7a02f09d93d406f6a8c58006e;p=github%2FChocobozzz%2FPeerTube.git Add extra text to button when partially subscribed to all channels --- diff --git a/client/src/app/shared/user-subscription/subscribe-button.component.html b/client/src/app/shared/user-subscription/subscribe-button.component.html index a119beff6..6ac8af3de 100644 --- a/client/src/app/shared/user-subscription/subscribe-button.component.html +++ b/client/src/app/shared/user-subscription/subscribe-button.component.html @@ -2,10 +2,15 @@ [ngClass]="{'subscribe-button': !isAllChannelsSubscribed(), 'unsubscribe-button': isAllChannelsSubscribed()}"> - + Subscribe - Subscribe to all channels + + Subscribe to all channels + {{subscribeStatus(true).length}}/{{subscribed.size}} + channels subscribed + + {{ videoChannel.followersCount | myNumberFormatter }} @@ -24,9 +29,11 @@ class="btn btn-sm" role="button" (click)="unsubscribe()" i18n > - - Unsubscribe - Unsubscribe from all channels + + + Unsubscribe + Unsubscribe from all channels + diff --git a/client/src/app/shared/user-subscription/subscribe-button.component.scss b/client/src/app/shared/user-subscription/subscribe-button.component.scss index 92a28aad9..164b917b8 100644 --- a/client/src/app/shared/user-subscription/subscribe-button.component.scss +++ b/client/src/app/shared/user-subscription/subscribe-button.component.scss @@ -69,3 +69,16 @@ @include peertube-input-text(100%); } } + +.extra-text { + display: flex; + flex-direction: column; + + span:first-child { + line-height: 75%; + } + + span:not(:first-child) { + font-size: 60%; + } +} diff --git a/client/src/app/shared/user-subscription/subscribe-button.component.ts b/client/src/app/shared/user-subscription/subscribe-button.component.ts index 0c1f71c6c..f0bee9d47 100644 --- a/client/src/app/shared/user-subscription/subscribe-button.component.ts +++ b/client/src/app/shared/user-subscription/subscribe-button.component.ts @@ -15,6 +15,12 @@ import { forkJoin } from 'rxjs' styleUrls: [ './subscribe-button.component.scss' ] }) export class SubscribeButtonComponent implements OnInit { + /** + * SubscribeButtonComponent can be used with a single VideoChannel passed as [VideoChannel], + * or with an account and a full list of that account's videoChannels. The latter is intended + * to allow mass un/subscription from an account's page, while keeping the channel-centric + * subscription model. + */ @Input() account: Account @Input() videoChannels: VideoChannel[] @Input() displayFollowers = false diff --git a/client/src/sass/include/_mixins.scss b/client/src/sass/include/_mixins.scss index 88cbf3384..099a909bb 100644 --- a/client/src/sass/include/_mixins.scss +++ b/client/src/sass/include/_mixins.scss @@ -509,6 +509,8 @@ a { margin-top: 0; margin-bottom: 0; + text-transform: uppercase; + font-weight: 600; } } }