Skip to content

Commit 8c26cfb

Browse files
committedOct 21, 2023
Implement curated list for default landing page dropdown options
1 parent 745c435 commit 8c26cfb

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed
 

‎src/renderer/components/general-settings/general-settings.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ export default defineComponent({
4242
'',
4343
'openLinkAfterPrompt',
4444
'doNothing'
45+
],
46+
includedDefaultPageNames: [
47+
'subscriptions',
48+
'subscribedChannels',
49+
'trending',
50+
'popular',
51+
'userPlaylists',
52+
'history',
53+
'settings'
4554
]
4655
}
4756
},
@@ -62,8 +71,7 @@ export default defineComponent({
6271
return this.$store.getters.getCheckForBlogPosts
6372
},
6473
defaultPages: function () {
65-
// filter out default '/' route and routes with params
66-
return this.$router.getRoutes().filter((route, i) => i !== 0 && !route.path.includes(':'))
74+
return this.$router.getRoutes().filter((route) => this.includedDefaultPageNames.includes(route.name))
6775
},
6876
defaultPageNames: function () {
6977
return this.defaultPages.map((route) => this.$t(route.meta.title))

0 commit comments

Comments
 (0)