]>
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 C |
32 | <div class="optional-rows" *ngIf="playlist.optionalRowDisplayed"> |
33 | <div class="labels"> | |
34 | <div i18n>Start at</div> | |
35 | <div i18n>Stop at</div> | |
36 | </div> | |
c06af501 | 37 | |
e79df4ee C |
38 | <div *ngFor="let element of buildOptionalRowElements(playlist)"> |
39 | <my-peertube-checkbox | |
40 | [inputName]="getOptionalInputName(playlist, element)" | |
41 | [ngModel]="element.enabled" [onPushWorkaround]="true" | |
42 | (click)="toggleOptionalPlaylist($event, playlist, element, startAt.timestamp, stopAt.timestamp)" | |
43 | ></my-peertube-checkbox> | |
f0a39880 | 44 | |
e79df4ee C |
45 | <my-timestamp-input |
46 | [maxTimestamp]="video.duration" | |
47 | [(ngModel)]="element.startTimestamp" | |
48 | (inputBlur)="onElementTimestampUpdate(playlist, element)" | |
49 | #startAt | |
50 | ></my-timestamp-input> | |
f0a39880 | 51 | |
e79df4ee C |
52 | <my-timestamp-input |
53 | [maxTimestamp]="video.duration" | |
54 | [(ngModel)]="element.stopTimestamp" | |
55 | (inputBlur)="onElementTimestampUpdate(playlist, element)" | |
56 | #stopAt | |
57 | ></my-timestamp-input> | |
223b24e6 | 58 | </div> |
3a0fb65c | 59 | </div> |
f0a39880 C |
60 | </div> |
61 | </div> | |
f0a39880 | 62 | |
3a0fb65c | 63 | <div class="new-playlist-button dropdown-item" (click)="openCreateBlock($event)" [hidden]="isNewPlaylistBlockOpened"> |
6ad971d5 | 64 | <my-global-icon iconName="add" aria-hidden="true"></my-global-icon> |
f0a39880 | 65 | |
97eae838 | 66 | <span i18n>Create a private playlist</span> |
3a0fb65c | 67 | </div> |
f0a39880 | 68 | |
3a0fb65c C |
69 | <form class="new-playlist-block dropdown-item" *ngIf="isNewPlaylistBlockOpened" (ngSubmit)="createPlaylist()" [formGroup]="form"> |
70 | <div class="form-group"> | |
71 | <label i18n for="displayName">Display name</label> | |
72 | <input | |
73 | type="text" id="displayName" | |
74 | formControlName="displayName" [ngClass]="{ 'input-error': formErrors['displayName'] }" | |
75 | > | |
76 | <div *ngIf="formErrors['displayName']" class="form-error"> | |
77 | {{ formErrors['displayName'] }} | |
78 | </div> | |
f0a39880 | 79 | </div> |
f0a39880 | 80 | |
3a0fb65c C |
81 | <input type="submit" i18n-value value="Create" [disabled]="!form.valid"> |
82 | </form> | |
83 | </div> |