mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-11-04 03:17:00 -05:00 
			
		
		
		
	Merge pull request #3160 from glorenzen/home-page-ultrawide-support
Add ultrawide support for home page
This commit is contained in:
		
						commit
						2998d3ba6a
					
				@ -167,8 +167,19 @@ export default {
 | 
				
			|||||||
      this.loaded = true
 | 
					      this.loaded = true
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    async fetchCategories() {
 | 
					    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
 | 
					      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) => {
 | 
					        .then((data) => {
 | 
				
			||||||
          return data
 | 
					          return data
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user