mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
Inject MatDialog into ToolbarComponent and implement openSettings method to display the SettingsComponent. Update the toolbar HTML to include a settings button and conditionally render the favorite button based on the playlist ID. Enhance VideoPlayerComponent to react to settings changes by integrating SettingsStore.
52 lines
1.5 KiB
HTML
52 lines
1.5 KiB
HTML
<mat-toolbar color="primary">
|
|
<button
|
|
mat-icon-button
|
|
(click)="toggleLeftDrawerClicked.emit()"
|
|
[matTooltip]="'TOP_MENU.OPEN_CHANNELS_LIST' | translate"
|
|
class="sidenav-toggle-button"
|
|
>
|
|
<mat-icon>menu</mat-icon>
|
|
</button>
|
|
@if ((playlistId$ | async) !== 'GLOBAL_FAVORITES') {
|
|
<button
|
|
mat-icon-button
|
|
(click)="addToFavorites(activeChannel)"
|
|
[matTooltip]="'TOP_MENU.TOGGLE_FAVORITE_FLAG' | translate"
|
|
>
|
|
<mat-icon>
|
|
{{
|
|
(favorites$ | async).includes(activeChannel?.id)
|
|
? 'star'
|
|
: 'star_outline'
|
|
}}</mat-icon
|
|
>
|
|
</button>
|
|
}
|
|
{{ activeChannel?.name }}
|
|
<div class="spacer"></div>
|
|
<button
|
|
mat-icon-button
|
|
(click)="openSettings()"
|
|
[matTooltip]="'MENU.SETTINGS' | translate"
|
|
>
|
|
<mat-icon>settings</mat-icon>
|
|
</button>
|
|
@let isEpgAvailable = isEpgAvailable$ | async;
|
|
@if (isEpgAvailable) {
|
|
<button
|
|
mat-icon-button
|
|
(click)="multiEpgClicked.emit()"
|
|
[matTooltip]="'TOP_MENU.OPEN_MULTI_EPG' | translate"
|
|
>
|
|
<mat-icon>view_list</mat-icon>
|
|
</button>
|
|
<button
|
|
mat-button
|
|
(click)="toggleRightDrawerClicked.emit()"
|
|
[matTooltip]="'TOP_MENU.OPEN_EPG_LIST' | translate"
|
|
>
|
|
EPG
|
|
</button>
|
|
}
|
|
</mat-toolbar>
|