Skip to content

Commit

Permalink
Implement curated list for default landing page dropdown options
Browse files Browse the repository at this point in the history
  • Loading branch information
kommunarr committed Oct 21, 2023
1 parent 745c435 commit 8c26cfb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/renderer/components/general-settings/general-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ export default defineComponent({
'',
'openLinkAfterPrompt',
'doNothing'
],
includedDefaultPageNames: [
'subscriptions',
'subscribedChannels',
'trending',
'popular',
'userPlaylists',
'history',
'settings'
]
}
},
Expand All @@ -62,8 +71,7 @@ export default defineComponent({
return this.$store.getters.getCheckForBlogPosts
},
defaultPages: function () {
// filter out default '/' route and routes with params
return this.$router.getRoutes().filter((route, i) => i !== 0 && !route.path.includes(':'))
return this.$router.getRoutes().filter((route) => this.includedDefaultPageNames.includes(route.name))
},
defaultPageNames: function () {
return this.defaultPages.map((route) => this.$t(route.meta.title))
Expand Down

0 comments on commit 8c26cfb

Please sign in to comment.