aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+accounts/accounts.component.html
blob: 226fa8f3121929ef95a53478da6a83f1a20471c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<div *ngIf="account" class="root">
  <div class="account-info">

    <div class="account-avatar-row">
      <my-actor-avatar class="main-avatar" actorType="account" [actor]="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="pt-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
              >
                <my-global-icon iconName="copy"></my-global-icon>
              </button>
            </div>

            <div class="actor-counters">
              <span i18n>{naiveAggregatedSubscribers(), plural, =0 {No subscribers} =1 {1 subscriber} other {{{ naiveAggregatedSubscribers() }} subscribers}}</span>

              <span class="videos-count" *ngIf="accountVideosCount !== undefined" i18n>
                {accountVideosCount, plural, =0 {No videos} =1 {1 video} other {{{ accountVideosCount }} videos}}
              </span>
            </div>
          </div>
        </div>
      </div>
    </div>

    <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>

    <div class="buttons">
      <a *ngIf="isManageable()" routerLink="/my-account" class="peertube-button-link orange-button" i18n>
        Manage account
      </a>

      <my-subscribe-button *ngIf="hasVideoChannels() && !isManageable()" [account]="account" [videoChannels]="videoChannels"></my-subscribe-button>
    </div>
  </div>

  <div class="links" [ngClass]="{ 'on-channel-page': isOnChannelPage() }">
    <ng-template #linkTemplate let-item="item">
      <a [routerLink]="item.routerLink" routerLinkActive="active" class="sub-menu-entry">{{ 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>