Skip to content

Commit

Permalink
Merge pull request advplyr#3160 from glorenzen/home-page-ultrawide-su…
Browse files Browse the repository at this point in the history
…pport

Add ultrawide support for home page
  • Loading branch information
advplyr authored Jul 15, 2024
2 parents 733f610 + ea11153 commit 2998d3b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion client/components/app/BookShelfCategorized.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,19 @@ export default {
this.loaded = true
},
async fetchCategories() {
// Sets the limit for the number of items to be displayed based on the viewport width.
const viewportWidth = window.innerWidth
let limit
if (viewportWidth >= 3240) {
limit = 15
} else if (viewportWidth >= 2880 && viewportWidth < 3240) {
limit = 12
}
const limitQuery = limit ? `&limit=${limit}` : ''
const categories = await this.$axios
.$get(`/api/libraries/${this.currentLibraryId}/personalized?include=rssfeed,numEpisodesIncomplete,share`)
.$get(`/api/libraries/${this.currentLibraryId}/personalized?include=rssfeed,numEpisodesIncomplete,share${limitQuery}`)
.then((data) => {
return data
})
Expand Down

0 comments on commit 2998d3b

Please sign in to comment.