]>
Commit | Line | Data |
---|---|---|
3a0fb65c C |
1 | <div class="root"> |
2 | <div class="header"> | |
3 | <div class="first-row"> | |
4 | <div i18n class="title">Save to</div> | |
f0a39880 | 5 | </div> |
e79df4ee | 6 | </div> |
f0a39880 | 7 | |
e79df4ee C |
8 | <div class="input-container"> |
9 | <input type="text" placeholder="Search playlists" i18n-placeholder [(ngModel)]="videoPlaylistSearch" (ngModelChange)="onVideoPlaylistSearchChanged()" /> | |
10 | </div> | |
f0a39880 | 11 | |
e79df4ee C |
12 | <div class="playlists"> |
13 | <div | |
14 | *ngFor="let playlist of videoPlaylists" | |
15 | class="playlist dropdown-item" [ngClass]="{ 'has-optional-row': playlist.optionalRowDisplayed }" | |
16 | > | |
07098c33 | 17 | <div class="primary-row" (click)="toggleMainPlaylist($event, playlist)"> |
3a0fb65c | 18 | <my-peertube-checkbox |
e79df4ee C |
19 | [disabled]="isPresentMultipleTimes(playlist) || playlist.optionalRowDisplayed" [inputName]="getPrimaryInputName(playlist)" |
20 | [ngModel]="isPrimaryCheckboxChecked(playlist)" [onPushWorkaround]="true" | |
3a0fb65c | 21 | ></my-peertube-checkbox> |
f0a39880 | 22 | |
07098c33 | 23 | <label class="display-name"> |
e79df4ee C |
24 | {{ playlist.displayName }} |
25 | </label> | |
26 | ||
07098c33 | 27 | <div class="optional-row-icon" *ngIf="isPrimaryCheckboxChecked(playlist)" (click)="$event.stopPropagation(); toggleOptionalRow(playlist)"> |
e79df4ee C |
28 | <my-global-icon iconName="add" aria-hidden="true"></my-global-icon> |
29 | </div> | |
3a0fb65c | 30 | </div> |
f0a39880 | 31 | |
e79df4ee | 32 | <div class="optional-rows" *ngIf="playlist.optionalRowDisplayed"> |
5b0ec7cd C |
33 | <div class="header-label" i18n>Start at</div> |
34 | <div class="header-label" i18n>Stop at</div> | |
c06af501 | 35 | |
5b0ec7cd | 36 | <ng-container *ngFor="let element of buildOptionalRowElements(playlist)"> |
e79df4ee C |
37 | <my-peertube-checkbox |
38 | [inputName]="getOptionalInputName(playlist, element)" | |
39 | [ngModel]="element.enabled" [onPushWorkaround]="true" | |
40 | (click)="toggleOptionalPlaylist($event, playlist, element, startAt.timestamp, stopAt.timestamp)" | |
41 | ></my-peertube-checkbox> | |
f0a39880 | 42 | |
e79df4ee C |
43 | <my-timestamp-input |
44 | [maxTimestamp]="video.duration" | |
45 | [(ngModel)]="element.startTimestamp" | |
46 | (inputBlur)="onElementTimestampUpdate(playlist, element)" | |
47 | #startAt | |
48 | ></my-timestamp-input> | |
f0a39880 | 49 | |
e79df4ee C |
50 | <my-timestamp-input |
51 | [maxTimestamp]="video.duration" | |
52 | [(ngModel)]="element.stopTimestamp" | |
53 | (inputBlur)="onElementTimestampUpdate(playlist, element)" | |
54 | #stopAt | |
55 | ></my-timestamp-input> | |
5b0ec7cd | 56 | </ng-container> |
3a0fb65c | 57 | </div> |
f0a39880 C |
58 | </div> |
59 | </div> | |
f0a39880 | 60 | |
3a0fb65c | 61 | <div class="new-playlist-button dropdown-item" (click)="openCreateBlock($event)" [hidden]="isNewPlaylistBlockOpened"> |
6ad971d5 | 62 | <my-global-icon iconName="add" aria-hidden="true"></my-global-icon> |
f0a39880 | 63 | |
97eae838 | 64 | <span i18n>Create a private playlist</span> |
3a0fb65c | 65 | </div> |
f0a39880 | 66 | |
3a0fb65c C |
67 | <form class="new-playlist-block dropdown-item" *ngIf="isNewPlaylistBlockOpened" (ngSubmit)="createPlaylist()" [formGroup]="form"> |
68 | <div class="form-group"> | |
69 | <label i18n for="displayName">Display name</label> | |
70 | <input | |
71 | type="text" id="displayName" | |
72 | formControlName="displayName" [ngClass]="{ 'input-error': formErrors['displayName'] }" | |
73 | > | |
74 | <div *ngIf="formErrors['displayName']" class="form-error"> | |
75 | {{ formErrors['displayName'] }} | |
76 | </div> | |
f0a39880 | 77 | </div> |
f0a39880 | 78 | |
3a0fb65c C |
79 | <input type="submit" i18n-value value="Create" [disabled]="!form.valid"> |
80 | </form> | |
81 | </div> |