-
-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add favorites and tab based navigation
- Loading branch information
Showing
13 changed files
with
244 additions
and
99 deletions.
There are no files selected for viewing
91 changes: 65 additions & 26 deletions
91
src/app/components/channel-list-container/channel-list-container.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,68 @@ | ||
<mat-list id="top-panel"> | ||
<mat-list-item> | ||
<mat-form-field class="full-width"> | ||
<input matInput placeholder="Search channel ({{channelList?.length}})" [(ngModel)]="searchTerm.name"> | ||
</mat-form-field> | ||
<button mat-icon-button [routerLink]="'/'" matTooltip="Upload or select other playlist"> | ||
<mat-icon>create_new_folder</mat-icon> | ||
</button> | ||
</mat-list-item> | ||
</mat-list> | ||
<mat-nav-list id="channels-list"> | ||
<mat-accordion class="example-headers-align" multi> | ||
<ng-container *ngFor="let groups of channelList | keyvalue"> | ||
<mat-expansion-panel *ngIf="groups.value.length > 0"> | ||
<mat-expansion-panel-header> | ||
{{groups.key || 'Ungrouped'}} ({{groups.value.length}}) | ||
</mat-expansion-panel-header> | ||
|
||
<mat-list-item | ||
*ngFor="let channel of groups.value | filterBy: searchTerm; index as i" | ||
<mat-tab-group> | ||
<mat-tab label="All channels"> | ||
<mat-list id="top-panel"> | ||
<mat-list-item> | ||
<mat-form-field class="full-width"> | ||
<input matInput placeholder="Search channel ({{_channelList?.length}})" | ||
[(ngModel)]="searchTerm.name"> | ||
</mat-form-field> | ||
<button mat-icon-button [routerLink]="'/'" matTooltip="Upload or select other playlist"> | ||
<mat-icon>create_new_folder</mat-icon> | ||
</button> | ||
</mat-list-item> | ||
</mat-list> | ||
<mat-nav-list id="channels-list"> | ||
<mat-accordion multi> | ||
<mat-list-item *ngFor="let channel of _channelList | filterBy: searchTerm; index as i" | ||
[class.active]="selected?.id === channel.id" (click)="selectChannel(channel)"> | ||
{{i+1 + '. ' + channel?.name || 'Unnamed Channel'}} | ||
<p matLine> | ||
{{ i+1 + '. ' + channel?.name || 'Unnamed Channel' }} | ||
</p> | ||
<button mat-icon-button color="primary" (click)="favChannel(channel, $event)"> | ||
<mat-icon>star{{ channel.fav ? '' : '_outline' }}</mat-icon> | ||
</button> | ||
<mat-divider></mat-divider> | ||
</mat-list-item> | ||
</mat-expansion-panel> | ||
|
||
</ng-container> | ||
</mat-accordion> | ||
</mat-nav-list> | ||
</mat-accordion> | ||
</mat-nav-list> | ||
</mat-tab> | ||
|
||
<mat-tab label="Groups"> | ||
<mat-nav-list id="channels-list"> | ||
<mat-accordion multi> | ||
<ng-container *ngFor="let groups of groupedChannels | keyvalue"> | ||
<mat-expansion-panel> | ||
<mat-expansion-panel-header *ngIf="groups.value.length > 0"> | ||
{{groups.key || 'Ungrouped'}} ({{groups.value.length}}) | ||
</mat-expansion-panel-header> | ||
<mat-list-item *ngFor="let channel of groups.value; index as i" | ||
[class.active]="selected?.id === channel.id" (click)="selectChannel(channel)"> | ||
<p matLine> | ||
{{ i+1 + '. ' + channel?.name || 'Unnamed Channel' }} | ||
</p> | ||
<button mat-icon-button color="primary" (click)="favChannel(channel, $event)"> | ||
<mat-icon>star{{ channel.fav ? '' : '_outline' }}</mat-icon> | ||
</button> | ||
<mat-divider></mat-divider> | ||
</mat-list-item> | ||
</mat-expansion-panel> | ||
</ng-container> | ||
</mat-accordion> | ||
</mat-nav-list> | ||
</mat-tab> | ||
|
||
<mat-tab label="Favorites"> | ||
<mat-nav-list> | ||
<mat-list-item *ngFor="let channel of favs | filterBy: searchTerm; index as i" | ||
[class.active]="selected?.id === channel.id" (click)="selectChannel(channel)"> | ||
<p matLine> | ||
{{ i+1 + '. ' + channel?.name || 'Unnamed Channel' }} | ||
</p> | ||
<button mat-icon-button color="primary" (click)="favChannel(channel, $event)"> | ||
<mat-icon>star{{ channel.fav ? '' : '_outline' }}</mat-icon> | ||
</button> | ||
<mat-divider></mat-divider> | ||
</mat-list-item> | ||
</mat-nav-list> | ||
</mat-tab> | ||
</mat-tab-group> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/app/components/recent-playlists/recent-playlists.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.