]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+accounts/accounts.component.html
Refactor my-subscribe-button to support full account subscription
[github/Chocobozzz/PeerTube.git] / client / src / app / +accounts / accounts.component.html
index 038e18c4bd5413878237e2888a96ca5dcc94848c..1b6eb480ebb13df1ba2650f34a98ffa4a0f7c1bb 100644 (file)
@@ -7,22 +7,36 @@
       <div class="actor-info">
         <div class="actor-names">
           <div class="actor-display-name">{{ account.displayName }}</div>
-          <div class="actor-name">{{ account.nameWithHost }}</div>
+          <div class="actor-name">{{ account.nameWithHost }}
 
+          <button ngxClipboard [cbContent]="account.nameWithHostForced" (click)="activateCopiedMessage()"
+                  class="btn btn-outline-secondary btn-sm copy-button"
+          >
+            <span class="glyphicon glyphicon-copy"></span>
+          </button>
+
+          </div>
           <span *ngIf="user?.blocked" [ngbTooltip]="user.blockedReason" class="badge badge-danger" i18n>Banned</span>
           <span *ngIf="account.mutedByUser" class="badge badge-danger" i18n>Muted</span>
-          <span *ngIf="account.mutedServerByUser" class="badge badge-danger" i18n>Muted by your instance</span>
-          <span *ngIf="account.mutedByInstance" class="badge badge-danger" i18n>Instance muted</span>
+          <span *ngIf="account.mutedServerByUser" class="badge badge-danger" i18n>Instance muted</span>
+          <span *ngIf="account.mutedByInstance" class="badge badge-danger" i18n>Muted by your instance</span>
           <span *ngIf="account.mutedServerByInstance" class="badge badge-danger" i18n>Instance muted by your instance</span>
 
           <my-user-moderation-dropdown
-            buttonSize="small" [account]="account" [user]="user"
+            buttonSize="small" [account]="account" [user]="user" placement="bottom-right auto"
             (userChanged)="onUserChanged()" (userDeleted)="onUserDeleted()"
           >
           </my-user-moderation-dropdown>
         </div>
-        <div i18n class="actor-followers">{{ account.followersCount }} subscribers</div>
+        <div class="actor-followers">
+          {{ account.followersCount }} 
+          <ng-container *ngIf="account.followersCount === 1; then single; else multiple"></ng-container>
+          <ng-template i18n #single>subscriber</ng-template>
+          <ng-template i18n #multiple>subscribers</ng-template>
+        </div>
       </div>
+
+      <my-subscribe-button *ngIf="videoChannels" [account]="account" [videoChannels]="videoChannels"></my-subscribe-button>
     </div>
 
     <div class="links">