]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+video-channels/video-channels.component.html
Don't manage remote channels
[github/Chocobozzz/PeerTube.git] / client / src / app / +video-channels / video-channels.component.html
index c65b5713d76b25943993eec491543c9e87cd1adc..212e2f8671454e0d60f6cd02e34263726d21c41a 100644 (file)
-<div *ngIf="videoChannel" class="row">
-  <div class="sub-menu">
+<div class="root" *ngIf="videoChannel">
+  <div class="banner" *ngIf="videoChannel.bannerUrl">
+    <img [src]="videoChannel.bannerUrl" alt="Channel banner">
+  </div>
+
+  <div class="channel-info">
+
+    <ng-template #buttonsTemplate>
+      <a *ngIf="isManageable()" [routerLink]="[ '/manage/update', videoChannel.nameWithHost  ]" class="peertube-button-link orange-button" i18n>
+        Manage channel
+      </a>
+
+      <my-subscribe-button *ngIf="!isOwner()" #subscribeButton [videoChannels]="[videoChannel]"></my-subscribe-button>
+
+      <button *ngIf="videoChannel.support" (click)="showSupportModal()" class="support-button peertube-button orange-button-inverted">
+        <my-global-icon iconName="support" aria-hidden="true"></my-global-icon>
+        <span class="icon-text" i18n>Support</span>
+      </button>
+    </ng-template>
+
+    <ng-template #ownerTemplate>
+      <div class="owner-block">
+        <div class="section-label" i18n>OWNER ACCOUNT</div>
+
+        <div class="avatar-row">
+          <my-actor-avatar class="account-avatar" [account]="ownerAccount" [internalHref]="getAccountUrl()"></my-actor-avatar>
+
+          <div class="actor-info">
+            <h4>
+              <a [routerLink]="getAccountUrl()" title="View account" i18n-title>{{ ownerAccount.displayName }}</a>
+            </h4>
 
-    <div class="actor">
-      <img [src]="videoChannel.avatarUrl" alt="Avatar" />
+            <div class="actor-handle">@{{ videoChannel.ownerBy }}</div>
 
-      <div class="actor-info">
-        <div class="actor-names">
-          <div class="actor-display-name">{{ videoChannel.displayName }}</div>
-          <div class="actor-name">{{ videoChannel.nameWithHost }}</div>
+            <my-account-block-badges [account]="ownerAccount"></my-account-block-badges>
+          </div>
+        </div>
 
-          <my-subscribe-button #subscribeButton [videoChannel]="videoChannel"></my-subscribe-button>
+        <div class="owner-description">
+          <div class="description-html" [innerHTML]="ownerDescriptionHTML"></div>
         </div>
-        <div i18n class="actor-followers">{{ videoChannel.followersCount }} subscribers</div>
 
-        <a [routerLink]="[ '/accounts', videoChannel.ownerBy ]" i18n-title title="Go the owner account page" class="actor-owner">
-          <span i18n>Created by {{ videoChannel.ownerBy }}</span>
-          <img [src]="videoChannel.ownerAvatarUrl" alt="Owner account avatar" />
+        <a class="view-account short" [routerLink]="getAccountUrl()" i18n>
+          View account
+        </a>
+
+        <a class="view-account complete" [routerLink]="getAccountUrl()" i18n>
+          View owner account
         </a>
       </div>
+    </ng-template>
+
+    <div class="channel-avatar-row">
+      <my-actor-avatar class="main-avatar" [channel]="videoChannel"></my-actor-avatar>
+
+      <div>
+        <div class="section-label" i18n>VIDEO CHANNEL</div>
+
+        <div class="actor-info">
+          <div>
+            <div class="actor-display-name">
+              <h1 i18n-title [title]="'Channel created on ' + (videoChannel.createdAt | date)">{{ videoChannel.displayName }}</h1>
+            </div>
+
+            <div class="actor-handle">
+              <span>@{{ videoChannel.nameWithHost }}</span>
+              <button [cdkCopyToClipboard]="videoChannel.nameWithHostForced" (click)="activateCopiedMessage()"
+                      class="btn btn-outline-secondary btn-sm copy-button" title="Copy channel handle" i18n-title
+              >
+                <span class="glyphicon glyphicon-duplicate"></span>
+              </button>
+            </div>
+
+            <div class="actor-counters">
+              <span i18n>{videoChannel.followersCount, plural, =1 {1 subscriber} other {{{ videoChannel.followersCount }} subscribers}}</span>
+
+              <span class="videos-count" *ngIf="channelVideosCount !== undefined" i18n>
+                {channelVideosCount, plural, =1 {1 videos} other {{{ channelVideosCount }} videos}}
+              </span>
+            </div>
+          </div>
+
+          <div class="channel-buttons right">
+            <ng-template *ngTemplateOutlet="buttonsTemplate"></ng-template>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <div class="channel-description" [ngClass]="{ expanded: channelDescriptionExpanded }">
+      <div class="description-html" [innerHTML]="channelDescriptionHTML"></div>
+    </div>
+
+    <div *ngIf="hasShowMoreDescription()" class="show-more" role="button"
+      (click)="channelDescriptionExpanded = !channelDescriptionExpanded"
+      title="Show the complete description" i18n-title i18n
+    >
+      Show more...
     </div>
 
-    <div class="links">
-      <a i18n routerLink="videos" routerLinkActive="active" class="title-page">Videos</a>
-      <a i18n routerLink="about" routerLinkActive="active" class="title-page">About</a>
+    <div class="channel-buttons bottom">
+      <ng-template *ngTemplateOutlet="buttonsTemplate"></ng-template>
+    </div>
+
+    <div class="owner-card">
+      <ng-template *ngTemplateOutlet="ownerTemplate"></ng-template>
     </div>
   </div>
 
-  <div class="margin-content">
-    <router-outlet></router-outlet>
+  <div class="bottom-owner">
+    <ng-template *ngTemplateOutlet="ownerTemplate"></ng-template>
   </div>
+
+  <div class="links">
+    <ng-template #linkTemplate let-item="item">
+      <a [routerLink]="item.routerLink" routerLinkActive="active" class="title-page">{{ item.label }}</a>
+    </ng-template>
+
+    <my-list-overflow [items]="links" [itemTemplate]="linkTemplate"></my-list-overflow>
+  </div>
+
+  <router-outlet></router-outlet>
 </div>
+
+<my-support-modal #supportModal [videoChannel]="videoChannel"></my-support-modal>