mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
refactor: move global favorites to header
This commit is contained in:
1 parent
45b3a8be22
commit
81bdcd644c
4 files changed
+17
-27
No files matched your search
@@ -34,6 +34,14 @@
|
||||
<app-add-playlist-menu
|
||||
(playlistTypeSelected)="openAddPlaylistDialog($event)"
|
||||
/>
|
||||
<button
|
||||
mat-icon-button
|
||||
(click)="navigateToGlobalFavorites()"
|
||||
[matTooltip]="'HOME.PLAYLISTS.GLOBAL_FAVORITES' | translate"
|
||||
data-test-id="global-favorites"
|
||||
>
|
||||
<mat-icon>star</mat-icon>
|
||||
</button>
|
||||
<!-- Combined Filter & Sort button -->
|
||||
<button
|
||||
mat-icon-button
|
||||
|
||||
@@ -18,6 +18,7 @@ import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { DataService } from 'services';
|
||||
import { GLOBAL_FAVORITES_PLAYLIST_ID } from 'shared-interfaces';
|
||||
//import { shell } from 'electron';
|
||||
import { AddPlaylistMenuComponent, PlaylistType } from 'components';
|
||||
import { HomeComponent } from '../../../home/home.component';
|
||||
@@ -78,6 +79,13 @@ export class HeaderComponent implements OnInit {
|
||||
this.router.navigate(['/settings']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Navigates to the global favorites view
|
||||
*/
|
||||
navigateToGlobalFavorites(): void {
|
||||
this.router.navigate(['playlists', GLOBAL_FAVORITES_PLAYLIST_ID]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens the provided URL string in new browser window
|
||||
* @param url url to open
|
||||
|
||||
Reference in new issue
Block a user