navidrome/ui/src/album/albumLists.jsx
Deluan Quintão fcdd30ba8f
build(ui): migrate from CRA/Jest to Vite/Vitest (#3311)
* feat: create vite project

* feat: it's alive!

* feat: `make dev` working!

* feat: replace custom serviceWorker with vite plugin

* test: replace Jest with Vitest

* fix: run prettier

* fix: skip eslint for now.

* chore: remove ui.old folder

* refactor: replace lodash.pick with simple destructuring

* fix: eslint errors (wip)

* fix: eslint errors (wip)

* fix: display-name eslint errors (wip)

* fix: no-console eslint errors (wip)

* fix: react-refresh/only-export-components eslint errors (wip)

* fix: react-refresh/only-export-components eslint errors (wip)

* fix: react-refresh/only-export-components eslint errors (wip)

* fix: react-refresh/only-export-components eslint errors (wip)

* fix: build

* fix: pwa manifest

* refactor: pwa manifest

* refactor: simplify PORT configuration

* refactor: rename simple JS files

* test: cover playlistUtils

* fix: react-image-lightbox

* feat(ui): add sourcemaps to help debug issues
2024-09-28 11:54:36 -04:00

84 lines
2.4 KiB
JavaScript

import React from 'react'
import ShuffleIcon from '@material-ui/icons/Shuffle'
import LibraryAddIcon from '@material-ui/icons/LibraryAdd'
import VideoLibraryIcon from '@material-ui/icons/VideoLibrary'
import RepeatIcon from '@material-ui/icons/Repeat'
import AlbumIcon from '@material-ui/icons/Album'
import FavoriteIcon from '@material-ui/icons/Favorite'
import FavoriteBorderIcon from '@material-ui/icons/FavoriteBorder'
import StarIcon from '@material-ui/icons/Star'
import StarBorderIcon from '@material-ui/icons/StarBorder'
import AlbumOutlinedIcon from '@material-ui/icons/AlbumOutlined'
import LibraryAddOutlinedIcon from '@material-ui/icons/LibraryAddOutlined'
import VideoLibraryOutlinedIcon from '@material-ui/icons/VideoLibraryOutlined'
import config from '../config'
import DynamicMenuIcon from '../layout/DynamicMenuIcon'
const albumLists = {
all: {
icon: (
<DynamicMenuIcon
path={'album/all'}
icon={AlbumOutlinedIcon}
activeIcon={AlbumIcon}
/>
),
params: 'sort=name&order=ASC&filter={}',
},
random: {
icon: <ShuffleIcon />,
params: 'sort=random&order=ASC&filter={}',
},
...(config.enableFavourites && {
starred: {
icon: (
<DynamicMenuIcon
path={'album/starred'}
icon={FavoriteBorderIcon}
activeIcon={FavoriteIcon}
/>
),
params: 'sort=starred_at&order=DESC&filter={"starred":true}',
},
}),
...(config.enableStarRating && {
topRated: {
icon: (
<DynamicMenuIcon
path={'album/topRated'}
icon={StarBorderIcon}
activeIcon={StarIcon}
/>
),
params: 'sort=rating&order=DESC&filter={"has_rating":true}',
},
}),
recentlyAdded: {
icon: (
<DynamicMenuIcon
path={'album/recentlyAdded'}
icon={LibraryAddOutlinedIcon}
activeIcon={LibraryAddIcon}
/>
),
params: 'sort=recently_added&order=DESC&filter={}',
},
recentlyPlayed: {
icon: (
<DynamicMenuIcon
path={'album/recentlyPlayed'}
icon={VideoLibraryOutlinedIcon}
activeIcon={VideoLibraryIcon}
/>
),
params: 'sort=play_date&order=DESC&filter={"recently_played":true}',
},
mostPlayed: {
icon: <RepeatIcon />,
params: 'sort=play_count&order=DESC&filter={"recently_played":true}',
},
}
export default albumLists
export const defaultAlbumList = 'recentlyAdded'