@@ -70,8 +70,21 @@ export default defineComponent({
70
70
checkForBlogPosts : function ( ) {
71
71
return this . $store . getters . getCheckForBlogPosts
72
72
} ,
73
+ hidePlaylists : function ( ) {
74
+ return this . $store . getters . getHidePlaylists
75
+ } ,
76
+ hidePopularVideos : function ( ) {
77
+ return this . $store . getters . getHidePopularVideos
78
+ } ,
79
+ hideTrendingVideos : function ( ) {
80
+ return this . $store . getters . getHideTrendingVideos
81
+ } ,
73
82
defaultPages : function ( ) {
74
- return this . $router . getRoutes ( ) . filter ( ( route ) => this . includedDefaultPageNames . includes ( route . name ) )
83
+ let includedPageNames = this . includedDefaultPageNames
84
+ if ( this . hideTrendingVideos ) includedPageNames = includedPageNames . filter ( ( pageName ) => pageName !== 'trending' )
85
+ if ( this . hidePlaylists ) includedPageNames = includedPageNames . filter ( ( pageName ) => pageName !== 'userPlaylists' )
86
+ if ( ! ( ! this . hidePopularVideos && ( this . backendFallback || this . backendPreference === 'invidious' ) ) ) includedPageNames = includedPageNames . filter ( ( pageName ) => pageName !== 'popular' )
87
+ return this . $router . getRoutes ( ) . filter ( ( route ) => includedPageNames . includes ( route . name ) )
75
88
} ,
76
89
defaultPageNames : function ( ) {
77
90
return this . defaultPages . map ( ( route ) => this . $t ( route . meta . title ) )
@@ -84,6 +97,11 @@ export default defineComponent({
84
97
return this . $store . getters . getBackendPreference
85
98
} ,
86
99
landingPage : function ( ) {
100
+ const landingPage = this . $store . getters . getLandingPage
101
+ // invalidate landing page selection & restore to default value if no longer valid
102
+ if ( ! this . defaultPageValues . includes ( landingPage ) ) {
103
+ this . updateLandingPage ( 'subscriptions' )
104
+ }
87
105
return this . $store . getters . getLandingPage
88
106
} ,
89
107
region : function ( ) {
0 commit comments