File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737 < app-search-input [(value)] ="searchValue " (tap) ="onSearchTap() " (valueChange) ="onSearchValueChange($event) "> </ app-search-input >
3838 </ section >
3939 < section mdcTopAppBarSection alignEnd >
40- < button mdcTopAppBarAction class ="material-icons " label ="Notifications " [class.red-color] ="notifications.hasUnread() " (click) ="toggleNotifications() "> {{ notifications.hasUnread() ? 'notifications_active' : 'notifications' }}</ button >
41- < a [routerLink] ="['/settings'] " mdcTopAppBarAction class ="material-icons " label ="Settings "> settings</ a >
40+ < a
41+ *ngIf ="settings.openInNewTab "
42+ [routerLink] ="['/'] "
43+ [queryParams] ="{ view: view === views.Favorites ? views.Latest : views.Favorites } "
44+ [title] ="view === views.Favorites ? 'Show all' : 'Show favorites' "
45+ mdcTopAppBarAction
46+ class ="material-icons "
47+ label ="Show favorites "
48+ >
49+ {{ view === views.Favorites ? 'favorite' : 'favorite_border' }}
50+ </ a >
51+ < button
52+ mdcTopAppBarAction
53+ class ="material-icons "
54+ label ="Notifications "
55+ title ="Notifications "
56+ [class.red-color] ="notifications.hasUnread() "
57+ (click) ="toggleNotifications() "
58+ >
59+ {{ notifications.hasUnread() ? 'notifications_active' : 'notifications' }}
60+ </ button >
61+ < a
62+ [routerLink] ="['/settings'] "
63+ mdcTopAppBarAction
64+ class ="material-icons "
65+ label ="Settings "
66+ title ="Settings "
67+ >
68+ settings
69+ </ a >
4270 </ section >
4371 </ div >
4472 < div mdcLinearProgress [indeterminate] ="true " [closed] ="!isLoading "> </ div >
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { View } from 'src/app/models/settings';
33import { Router } from '@angular/router' ;
44import { DebugService } from 'src/app/services/debug.service' ;
55import { NotificationsService } from 'src/app/services/notifications.service' ;
6+ import { SettingsService } from 'src/app/services/settings.service' ;
67
78@Component ( {
89 selector : 'app-layout' ,
@@ -24,6 +25,7 @@ export class LayoutComponent implements OnInit {
2425 constructor (
2526 public router : Router ,
2627 private debug : DebugService ,
28+ public settings : SettingsService ,
2729 public notifications : NotificationsService
2830 ) {
2931 this . debug . log ( 'Router url:' , this . router . url ) ;
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ export class SettingsService {
7070 getDefaults ( ) {
7171 return {
7272 proxy : this . browser . isWebExtension ? '' : CORSProxies [ 0 ] . url ,
73- openInNewTab : this . browser . isFirefox ? true : false ,
73+ openInNewTab : ! this . browser . isWebExtension || this . browser . isFirefox ? true : false ,
7474 openLinksInInactiveTabs : true ,
7575 maxEpisodesToRetrieve : 50 ,
7676 enableDebugging : false ,
You can’t perform that action at this time.
0 commit comments