]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+accounts/accounts.component.html
Merge branch 'release/4.0.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / +accounts / accounts.component.html
index c1377c1ea5cfceb0aa81be14a4da8de2dbf60e94..8362e6b7e50bfa5f30bdd6882c16ce8b165e3dc3 100644 (file)
@@ -1,40 +1,87 @@
-<div *ngIf="account" class="row">
-  <div class="sub-menu">
-
-    <div class="actor">
-      <img [src]="account.avatarUrl" alt="Avatar" />
-
-      <div class="actor-info">
-        <div class="actor-names">
-          <div class="actor-display-name">{{ account.displayName }}</div>
-          <div class="actor-name">{{ account.nameWithHost }}</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.mutedServerByInstance" class="badge badge-danger" i18n>Instance muted by your instance</span>
-
-          <my-user-moderation-dropdown
-            buttonSize="small" [account]="account" [user]="user"
-            (userChanged)="onUserChanged()" (userDeleted)="onUserDeleted()"
-          >
-          </my-user-moderation-dropdown>
+<div *ngIf="account" class="root">
+  <div class="account-info">
+
+    <div class="account-avatar-row">
+      <my-actor-avatar class="main-avatar" [account]="account"></my-actor-avatar>
+
+      <div>
+        <div class="section-label" i18n>ACCOUNT</div>
+
+        <div class="actor-info">
+          <div>
+            <div class="actor-display-name">
+              <h1 i18n-title [title]="'Created on ' + (account.createdAt | date)">{{ account.displayName }}</h1>
+
+              <my-user-moderation-dropdown
+                [prependActions]="prependModerationActions"
+                buttonSize="small" [account]="account" [user]="accountUser" placement="bottom-left auto"
+                (userChanged)="onUserChanged()" (userDeleted)="onUserDeleted()"
+              ></my-user-moderation-dropdown>
+
+              <span *ngIf="accountUser?.blocked" [ngbTooltip]="accountUser.blockedReason" class="badge badge-danger" i18n>Banned</span>
+
+              <my-account-block-badges [account]="account"></my-account-block-badges>
+            </div>
+
+            <div class="actor-handle">
+              <span>@{{ account.nameWithHost }}</span>
+              <button [cdkCopyToClipboard]="account.nameWithHostForced" (click)="activateCopiedMessage()"
+                      class="btn btn-outline-secondary btn-sm copy-button" title="Copy account handle" i18n-title
+              >
+                <span class="glyphicon glyphicon-duplicate"></span>
+              </button>
+            </div>
+
+            <div class="actor-counters">
+              <span i18n>{naiveAggregatedSubscribers(), plural, =1 {1 subscriber} other {{{ naiveAggregatedSubscribers() }} subscribers}}</span>
+
+              <span class="videos-count" *ngIf="accountVideosCount !== undefined" i18n>
+                {accountVideosCount, plural, =1 {1 videos} other {{{ accountVideosCount }} videos}}
+              </span>
+            </div>
+          </div>
         </div>
-        <div i18n class="actor-followers">{{ account.followersCount }} subscribers</div>
       </div>
     </div>
 
-    <div class="links">
-      <a i18n routerLink="videos" routerLinkActive="active" class="title-page">Videos</a>
+    <div class="description" [ngClass]="{ expanded: accountDescriptionExpanded }">
+      <div class="description-html" [innerHTML]="accountDescriptionHTML"></div>
+    </div>
+
+    <div *ngIf="hasShowMoreDescription()" class="show-more" role="button"
+      (click)="accountDescriptionExpanded = !accountDescriptionExpanded"
+      title="Show the complete description" i18n-title i18n
+    >
+      Show more...
+    </div>
 
-      <a i18n routerLink="video-channels" routerLinkActive="active" class="title-page">Video channels</a>
+    <div class="buttons">
+      <a *ngIf="isManageable()" routerLink="/my-account" class="peertube-button-link orange-button" i18n>
+        Manage account
+      </a>
 
-      <a i18n routerLink="about" routerLinkActive="active" class="title-page">About</a>
+      <my-subscribe-button *ngIf="hasVideoChannels() && !isManageable()" [account]="account" [videoChannels]="videoChannels"></my-subscribe-button>
     </div>
   </div>
 
-  <div class="margin-content">
-    <router-outlet></router-outlet>
+  <div class="links" [ngClass]="{ 'on-channel-page': isOnChannelPage() }">
+    <ng-template #linkTemplate let-item="item">
+      <a [routerLink]="item.routerLink" routerLinkActive="active" class="title-page">{{ item.label }}</a>
+    </ng-template>
+
+    <my-list-overflow [hidden]="hideMenu" [items]="links" [itemTemplate]="linkTemplate"></my-list-overflow>
+
+    <my-simple-search-input
+      [alwaysShow]="!isInSmallView()" (searchChanged)="searchChanged($event)"
+      (inputDisplayChanged)="onSearchInputDisplayChanged($event)" name="search-videos"
+      i18n-iconTitle icon-title="Search account videos"
+      i18n-placeholder placeholder="Search account videos"
+    ></my-simple-search-input>
   </div>
+
+  <router-outlet></router-outlet>
 </div>
+
+<ng-container *ngIf="prependModerationActions">
+  <my-account-report #accountReportModal></my-account-report>
+</ng-container>