]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-user-subscription/subscribe-button.component.html
Merge branch 'release/4.2.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-user-subscription / subscribe-button.component.html
index 85b3d1fdb2879569db5ef73c7b6f3ddb5a0d15a7..0e09c2697ba7fcaebbf4942320decd1629fc7063 100644 (file)
@@ -1,5 +1,7 @@
-<div class="btn-group-subscribe btn-group"
-    [ngClass]="{'subscribe-button': !isAllChannelsSubscribed, 'unsubscribe-button': isAllChannelsSubscribed, 'big': isBigButton }">
+<div
+  class="btn-group-subscribe btn-group" role="group"
+  [ngClass]="{'subscribe-button': !isAllChannelsSubscribed, 'unsubscribe-button': isAllChannelsSubscribed, 'big': isBigButton }"
+>
 
   <ng-template #userLoggedOut>
     <span [ngClass]="{ 'extra-text': isAtLeastOneChannelSubscribed }">
   </ng-template>
 
   <ng-template #userLoggedIn>
-    <button *ngIf="!isAllChannelsSubscribed" type="button"
-            class="btn btn-sm" role="button"
-            (click)="subscribe()">
+    <button *ngIf="!isAllChannelsSubscribed" type="button" class="btn" (click)="subscribe()">
       <ng-template [ngTemplateOutlet]="userLoggedOut"></ng-template>
     </button>
 
-    <button
-      *ngIf="isAllChannelsSubscribed" type="button"
-      class="btn btn-sm" role="button"
-      (click)="unsubscribe()">
+    <button *ngIf="isAllChannelsSubscribed" type="button" class="btn" role="button" (click)="unsubscribe()">
       <ng-container i18n>{account + "", select, undefined {Unsubscribe} other {Unsubscribe from all channels}}</ng-container>
     </button>
   </ng-template>
     *ngIf="isUserLoggedIn(); then userLoggedIn">
   </ng-container>
 
-  <div class="btn-group" ngbDropdown autoClose="outside"
-       placement="bottom-right" role="group"
-       aria-label="Multiple ways to subscribe to the current channel">
-    <button class="btn btn-sm dropdown-toggle-split" ngbDropdownToggle>
+  <div
+    class="btn-group" ngbDropdown autoClose="outside" placement="bottom-right bottom-left bottom auto"
+    role="group" aria-label="Multiple ways to subscribe to the current channel" i18n-aria-label
+  >
+    <button class="btn dropdown-toggle-split" ngbDropdownToggle aria-label="Open subscription dropdown" i18n-aria-label>
       <ng-container
         *ngIf="!isUserLoggedIn(); then userLoggedOut">
       </ng-container>
         <span *ngIf="isUserLoggedIn()" i18n>Subscribe with your local account</span>
       </button>
 
-      <button class="dropdown-item dropdown-item-neutral" i18n>Subscribe with a Mastodon account:</button>
-      <my-remote-subscribe [showHelp]="true" [uri]="uri"></my-remote-subscribe>
+      <button *ngIf="isRemoteSubscribeAvailable()" class="dropdown-item dropdown-item-neutral">
+        <div class="mb-1" i18n>Subscribe with a remote account:</div>
+        <my-remote-subscribe [showHelp]="true" [uri]="uri"></my-remote-subscribe>
+      </button>
 
       <div class="dropdown-divider"></div>