Add option to change max playlists shown in UI's sidebar, MaxSidebarPlaylists. Fix #2077
This commit is contained in:
@@ -8,6 +8,7 @@ const defaultConfig = {
|
||||
variousArtistsId: '03b645ef2100dfc42fa9785ea3102295', // See consts.VariousArtistsID in consts.go
|
||||
// Login backgrounds from https://unsplash.com/collections/1065384/music-wallpapers
|
||||
loginBackgroundURL: 'https://source.unsplash.com/collection/1065384/1600x900',
|
||||
maxSidebarPlaylists: 100,
|
||||
enableTranscodingConfig: true,
|
||||
enableDownloads: true,
|
||||
enableFavourites: true,
|
||||
|
||||
@@ -19,8 +19,6 @@ DraggableTypes.ALL.push(
|
||||
DraggableTypes.ARTIST
|
||||
)
|
||||
|
||||
export const MAX_SIDEBAR_PLAYLISTS = 100
|
||||
|
||||
export const DEFAULT_SHARE_BITRATE = 128
|
||||
|
||||
export const BITRATE_CHOICES = [
|
||||
|
||||
@@ -13,7 +13,8 @@ import { BiCog } from 'react-icons/bi'
|
||||
import { useDrop } from 'react-dnd'
|
||||
import SubMenu from './SubMenu'
|
||||
import { canChangeTracks } from '../common'
|
||||
import { DraggableTypes, MAX_SIDEBAR_PLAYLISTS } from '../consts'
|
||||
import { DraggableTypes } from '../consts'
|
||||
import config from '../config'
|
||||
|
||||
const PlaylistMenuItemLink = ({ pls, sidebarIsOpen }) => {
|
||||
const dataProvider = useDataProvider()
|
||||
@@ -56,7 +57,7 @@ const PlaylistsSubMenu = ({ state, setState, sidebarIsOpen, dense }) => {
|
||||
payload: {
|
||||
pagination: {
|
||||
page: 0,
|
||||
perPage: MAX_SIDEBAR_PLAYLISTS,
|
||||
perPage: config.maxSidebarPlaylists,
|
||||
},
|
||||
sort: { field: 'name' },
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user