]>
Commit | Line | Data |
---|---|---|
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> | |
5 | <ng-container *ngIf="!playing">{{ position }}</ng-container> | |
6 | </div> | |
7 | ||
8 | <my-video-thumbnail | |
9 | *ngIf="playlistElement.video" | |
10 | [video]="playlistElement.video" [nsfw]="isVideoBlur(playlistElement.video)" | |
11 | [videoRouterLink]="buildRouterLink()" [queryParams]="buildRouterQuery()" | |
12 | ></my-video-thumbnail> | |
13 | ||
14 | <div class="fake-thumbnail" *ngIf="!playlistElement.video"></div> | |
15 | ||
16 | <div class="video-info"> | |
17 | <ng-container *ngIf="playlistElement.video"> | |
18 | <a tabindex="-1" class="video-info-name" | |
19 | [routerLink]="buildRouterLink()" [queryParams]="buildRouterQuery()" | |
20 | [attr.title]="playlistElement.video.name" | |
21 | >{{ playlistElement.video.name }}</a> | |
22 | ||
23 | <a *ngIf="accountLink" tabindex="-1" class="video-info-account" [routerLink]="[ '/accounts', playlistElement.video.byAccount ]"> | |
24 | {{ playlistElement.video.byAccount }} | |
25 | </a> | |
26 | <span *ngIf="!accountLink" tabindex="-1" class="video-info-account">{{ playlistElement.video.byAccount }}</span> | |
27 | ||
28 | <span tabindex="-1" class="video-info-timestamp">{{ formatTimestamp(playlistElement) }}</span> | |
29 | </ng-container> | |
30 | ||
31 | <span *ngIf="!playlistElement.video" class="video-info-name"> | |
32 | <ng-container i18n *ngIf="isUnavailable(playlistElement)">Unavailable</ng-container> | |
33 | <ng-container i18n *ngIf="isPrivate(playlistElement)">Private</ng-container> | |
34 | <ng-container i18n *ngIf="isDeleted(playlistElement)">Deleted</ng-container> | |
35 | </span> | |
36 | </div> | |
37 | </a> | |
38 | ||
39 | <my-edit-button *ngIf="owned && touchScreenEditButton" [routerLink]="[ '/my-library', 'video-playlists', playlist.uuid ]"></my-edit-button> | |
40 | ||
41 | <div *ngIf="owned" class="more dropdown-root" ngbDropdown #moreDropdown="ngbDropdown" placement="left auto" | |
42 | (openChange)="onDropdownOpenChange()" autoClose="outside" container="body" | |
43 | > | |
44 | <my-global-icon iconName="more-vertical" ngbDropdownToggle role="button" class="icon-more" (click)="$event.preventDefault()"></my-global-icon> | |
45 | ||
46 | <div ngbDropdownMenu> | |
47 | <ng-container *ngIf="playlistElement.video"> | |
48 | <div class="dropdown-item" (click)="toggleDisplayTimestampsOptions($event, playlistElement)"> | |
49 | <my-global-icon iconName="edit" aria-hidden="true"></my-global-icon> | |
50 | <ng-container i18n>Edit starts/stops at</ng-container> | |
51 | </div> | |
52 | ||
53 | <div class="timestamp-options" *ngIf="displayTimestampOptions"> | |
54 | <div> | |
55 | <my-peertube-checkbox | |
56 | inputName="startAt" [(ngModel)]="timestampOptions.startTimestampEnabled" | |
57 | i18n-labelText labelText="Start at" | |
58 | ></my-peertube-checkbox> | |
59 | ||
60 | <my-timestamp-input | |
61 | [timestamp]="timestampOptions.startTimestamp" | |
62 | [maxTimestamp]="playlistElement.video.duration" | |
63 | [disabled]="!timestampOptions.startTimestampEnabled" | |
64 | [(ngModel)]="timestampOptions.startTimestamp" | |
65 | ></my-timestamp-input> | |
66 | </div> | |
67 | ||
68 | <div> | |
69 | <my-peertube-checkbox | |
70 | inputName="stopAt" [(ngModel)]="timestampOptions.stopTimestampEnabled" | |
71 | i18n-labelText labelText="Stop at" | |
72 | ></my-peertube-checkbox> | |
73 | ||
74 | <my-timestamp-input | |
75 | [timestamp]="timestampOptions.stopTimestamp" | |
76 | [maxTimestamp]="playlistElement.video.duration" | |
77 | [disabled]="!timestampOptions.stopTimestampEnabled" | |
78 | [(ngModel)]="timestampOptions.stopTimestamp" | |
79 | ></my-timestamp-input> | |
80 | </div> | |
81 | ||
82 | <input type="submit" i18n-value value="Save" (click)="updateTimestamps(playlistElement)"> | |
83 | </div> | |
84 | </ng-container> | |
85 | ||
86 | <span class="dropdown-item" (click)="removeFromPlaylist(playlistElement)"> | |
87 | <my-global-icon iconName="delete" aria-hidden="true"></my-global-icon> | |
88 | <ng-container i18n>Delete from {{ playlist?.displayName }}</ng-container> | |
89 | </span> | |
90 | </div> | |
91 | </div> | |
92 | </div> |