]>
Commit | Line | Data |
---|---|---|
e2f01c47 C |
1 | <div class="video" [ngClass]="{ playing: playing }"> |
2 | <a [routerLink]="buildRouterLink()" [queryParams]="buildRouterQuery()"> | |
3 | <div class="position"> | |
4 | <my-global-icon *ngIf="playing" iconName="play"></my-global-icon> | |
bce47964 | 5 | <ng-container *ngIf="!playing">{{ position }}</ng-container> |
e2f01c47 C |
6 | </div> |
7 | ||
8 | <my-video-thumbnail | |
bfbd9128 C |
9 | *ngIf="playlistElement.video" |
10 | [video]="playlistElement.video" [nsfw]="isVideoBlur(playlistElement.video)" | |
0bdad52f | 11 | [videoRouterLink]="buildRouterLink()" [queryParams]="buildRouterQuery()" |
e2f01c47 C |
12 | ></my-video-thumbnail> |
13 | ||
bfbd9128 C |
14 | <div class="fake-thumbnail" *ngIf="!playlistElement.video"></div> |
15 | ||
e2f01c47 | 16 | <div class="video-info"> |
bfbd9128 | 17 | <ng-container *ngIf="playlistElement.video"> |
af6b45e5 | 18 | <div class="video-info-header"> |
19 | <a tabindex="-1" class="video-info-name" | |
20 | [routerLink]="buildRouterLink()" [queryParams]="buildRouterQuery()" | |
21 | [attr.title]="playlistElement.video.name" | |
22 | >{{ playlistElement.video.name }}</a> | |
23 | ||
4c8749cb | 24 | <span *ngIf="isVideoPrivate()" class="pt-badge badge-yellow">Private</span> |
af6b45e5 | 25 | </div> |
bfbd9128 | 26 | |
692a2310 | 27 | <span class="video-miniature-created-at-views"> |
28 | <my-date-toggle [date]="playlistElement.video.publishedAt"></my-date-toggle> | |
29 | ||
30 | <span class="views" [title]="playlistElement.video.getExactNumberOfViews()"> | |
31 | • <my-video-views-counter [video]="playlistElement.video"></my-video-views-counter> | |
32 | </span> | |
33 | </span> | |
34 | ||
343d1395 C |
35 | <a *ngIf="accountLink" tabindex="-1" class="video-info-owner" [routerLink]="[ '/c', playlistElement.video.byVideoChannel ]"> |
36 | <ng-container *ngIf="getVideoOwnerDisplayType(playlistElement) === 'account'">{{ playlistElement.video.byAccount }}</ng-container> | |
37 | <ng-container *ngIf="getVideoOwnerDisplayType(playlistElement) === 'videoChannel'">{{ playlistElement.video.byVideoChannel }}</ng-container> | |
bfbd9128 | 38 | </a> |
343d1395 | 39 | |
bfbd9128 | 40 | <span *ngIf="!accountLink" tabindex="-1" class="video-info-account">{{ playlistElement.video.byAccount }}</span> |
e2f01c47 | 41 | |
bfbd9128 C |
42 | <span tabindex="-1" class="video-info-timestamp">{{ formatTimestamp(playlistElement) }}</span> |
43 | </ng-container> | |
e2f01c47 | 44 | |
bfbd9128 C |
45 | <span *ngIf="!playlistElement.video" class="video-info-name"> |
46 | <ng-container i18n *ngIf="isUnavailable(playlistElement)">Unavailable</ng-container> | |
47 | <ng-container i18n *ngIf="isPrivate(playlistElement)">Private</ng-container> | |
48 | <ng-container i18n *ngIf="isDeleted(playlistElement)">Deleted</ng-container> | |
49 | </span> | |
e2f01c47 C |
50 | </div> |
51 | </a> | |
52 | ||
17119e4a | 53 | <my-edit-button *ngIf="owned && touchScreenEditButton" [routerLink]="[ '/my-library', 'video-playlists', playlist.uuid ]"></my-edit-button> |
bedf0e60 | 54 | |
8b57efbf C |
55 | <div *ngIf="owned" class="more dropdown-root" ngbDropdown #moreDropdown="ngbDropdown" placement="left auto" |
56 | (openChange)="onDropdownOpenChange()" autoClose="outside" container="body" | |
bfbd9128 | 57 | > |
e2f01c47 C |
58 | <my-global-icon iconName="more-vertical" ngbDropdownToggle role="button" class="icon-more" (click)="$event.preventDefault()"></my-global-icon> |
59 | ||
60 | <div ngbDropdownMenu> | |
bfbd9128 | 61 | <ng-container *ngIf="playlistElement.video"> |
d0fbc9fd | 62 | <button ngbDropdownItem (click)="toggleDisplayTimestampsOptions($event, playlistElement)"> |
6ad971d5 | 63 | <my-global-icon iconName="edit" aria-hidden="true"></my-global-icon> |
bfbd9128 | 64 | <ng-container i18n>Edit starts/stops at</ng-container> |
d0fbc9fd | 65 | </button> |
e2f01c47 | 66 | |
bfbd9128 C |
67 | <div class="timestamp-options" *ngIf="displayTimestampOptions"> |
68 | <div> | |
69 | <my-peertube-checkbox | |
70 | inputName="startAt" [(ngModel)]="timestampOptions.startTimestampEnabled" | |
71 | i18n-labelText labelText="Start at" | |
72 | ></my-peertube-checkbox> | |
e2f01c47 | 73 | |
bfbd9128 C |
74 | <my-timestamp-input |
75 | [timestamp]="timestampOptions.startTimestamp" | |
76 | [maxTimestamp]="playlistElement.video.duration" | |
77 | [disabled]="!timestampOptions.startTimestampEnabled" | |
78 | [(ngModel)]="timestampOptions.startTimestamp" | |
79 | ></my-timestamp-input> | |
80 | </div> | |
e2f01c47 | 81 | |
bfbd9128 C |
82 | <div> |
83 | <my-peertube-checkbox | |
84 | inputName="stopAt" [(ngModel)]="timestampOptions.stopTimestampEnabled" | |
85 | i18n-labelText labelText="Stop at" | |
86 | ></my-peertube-checkbox> | |
e2f01c47 | 87 | |
bfbd9128 C |
88 | <my-timestamp-input |
89 | [timestamp]="timestampOptions.stopTimestamp" | |
90 | [maxTimestamp]="playlistElement.video.duration" | |
91 | [disabled]="!timestampOptions.stopTimestampEnabled" | |
92 | [(ngModel)]="timestampOptions.stopTimestamp" | |
93 | ></my-timestamp-input> | |
94 | </div> | |
e2f01c47 | 95 | |
bfbd9128 C |
96 | <input type="submit" i18n-value value="Save" (click)="updateTimestamps(playlistElement)"> |
97 | </div> | |
98 | </ng-container> | |
e2f01c47 | 99 | |
d0fbc9fd | 100 | <button ngbDropdownItem (click)="removeFromPlaylist(playlistElement)"> |
6ad971d5 | 101 | <my-global-icon iconName="delete" aria-hidden="true"></my-global-icon> |
bedf0e60 | 102 | <ng-container i18n>Delete from {{ playlist?.displayName }}</ng-container> |
d0fbc9fd | 103 | </button> |
e2f01c47 C |
104 | </div> |
105 | </div> | |
106 | </div> |