aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-video-miniature/video-miniature.component.html
blob: 3f01806955884db0b68c88c59cd4b0693bd6cf4e (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
<div class="video-miniature" [ngClass]="getClasses()" (mouseenter)="loadActions()">
  <my-video-thumbnail
    [video]="video" [nsfw]="isVideoBlur" [videoRouterLink]="videoRouterLink" [videoHref]="videoHref" [videoTarget]="videoTarget"
    [displayWatchLaterPlaylist]="isWatchLaterPlaylistDisplayed()" [inWatchLaterPlaylist]="inWatchLaterPlaylist" (watchLaterClick)="onWatchLaterClick($event)"
  >
    <ng-container ngProjectAs="label-warning" *ngIf="displayOptions.privacyLabel && isUnlistedVideo()" i18n>Unlisted</ng-container>
    <ng-container ngProjectAs="label-danger" *ngIf="displayOptions.privacyLabel && isPrivateVideo()" i18n>Private</ng-container>
  </my-video-thumbnail>

  <div class="video-bottom">
    <div class="video-miniature-information">
      <div class="d-flex video-miniature-meta">
        <my-actor-avatar
          *ngIf="displayOptions.avatar && displayOwnerVideoChannel() && !displayAsRow" [title]="channelLinkTitle"
          [actor]="video.channel" actorType="channel" [size]="actorImageSize" [internalHref]="[ '/c', video.byVideoChannel ]"
          size="32"
        ></my-actor-avatar>

        <my-actor-avatar
          *ngIf="displayOptions.avatar && displayOwnerAccount() && !displayAsRow" [title]="channelLinkTitle"
          [actor]="video.account" actorType="channel" [size]="actorImageSize" [internalHref]="[ '/c', video.byVideoChannel ]"
          size="32"
        ></my-actor-avatar>

        <div class="w-100 d-flex flex-column">
          <my-link
            [internalLink]="videoRouterLink" [href]="videoHref" [target]="videoTarget" [inheritParentCSS]="true"
            [title]="video.name" class="video-miniature-name" className="ellipsis-multiline-2" [ngClass]="{ 'blur-filter': isVideoBlur }"
          >
            {{ video.name }}
          </my-link>

          <span class="video-miniature-created-at-views">
            <my-date-toggle *ngIf="displayOptions.date" [date]="video.publishedAt"></my-date-toggle>

            <span class="views" [title]="video.getExactNumberOfViews()">
              <ng-container *ngIf="displayOptions.date && displayOptions.views"></ng-container>

              <my-video-views-counter *ngIf="displayOptions.views" [video]="video"></my-video-views-counter>
            </span>
          </span>

          <a *ngIf="displayOptions.by" class="video-miniature-account" [routerLink]="[ '/c', video.byVideoChannel ]">
            <ng-container *ngIf="displayOwnerAccount()">{{ authorAccount }}</ng-container>
            <ng-container *ngIf="displayOwnerVideoChannel()">{{ authorChannel }}</ng-container>
          </a>

          <div class="video-info-privacy">
            <ng-container *ngIf="displayOptions.privacyText">{{ video.privacy.label }}</ng-container>
            <ng-container *ngIf="displayOptions.privacyText && displayOptions.state && getStateLabel(video)"> - </ng-container>
            <ng-container *ngIf="displayOptions.state">{{ getStateLabel(video) }}</ng-container>
          </div>

          <div *ngIf="containedInPlaylists" class="contained-in-playlists">
            <a *ngFor="let playlist of containedInPlaylists" class="pt-badge badge-secondary" [routerLink]="['/w/p/', playlist.playlistShortUUID]">
              {{ playlist.playlistDisplayName }}
            </a>
          </div>
        </div>
      </div>

      <div *ngIf="displayOptions.blacklistInfo && video.blacklisted" class="video-info-blocked">
        <span class="blocked-label" i18n>Blocked</span>
        <span class="blocked-reason" *ngIf="video.blacklistedReason">{{ video.blacklistedReason }}</span>
      </div>

      <div i18n *ngIf="displayOptions.nsfw && video.nsfw" class="video-info-nsfw">
        Sensitive
      </div>
    </div>

    <div class="video-actions">
      <!-- FIXME: remove bottom placement when overflow is fixed in bootstrap dropdown: https://github.com/ng-bootstrap/ng-bootstrap/issues/3495 -->
      <my-video-actions-dropdown
        *ngIf="showActions" [video]="video" [displayOptions]="videoActionsDisplayOptions" placement="bottom-left bottom-right left auto"
        (videoRemoved)="onVideoRemoved()" (videoBlocked)="onVideoBlocked()" (videoUnblocked)="onVideoUnblocked()" (videoAccountMuted)="onVideoAccountMuted()"
      ></my-video-actions-dropdown>
    </div>
  </div>
</div>