Enable turn on/off Favorites/Loved feature. (#917)
* Added option to enable/disable favorites in Song * Added option to enable/disable favorites in Artist * Added option to enable/disable favorites in Albums and Favorites tab in sidebar * Added option to enable/disable favorites in Player * Set default value of enableFavourites as true * Improved the functionality to enable/disable Favorites * Add `EnableFavourites` config option Co-authored-by: Deluan <deluan@navidrome.org>
This commit is contained in:
@@ -20,6 +20,7 @@ import {
|
||||
SizeField,
|
||||
LoveButton,
|
||||
} from '../common'
|
||||
import config from '../config'
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
root: {
|
||||
@@ -160,14 +161,16 @@ const AlbumDetails = ({ record }) => {
|
||||
<CardContent className={classes.content}>
|
||||
<Typography variant="h5">
|
||||
{record.name}
|
||||
<LoveButton
|
||||
className={classes.loveButton}
|
||||
record={record}
|
||||
resource={'album'}
|
||||
size={isDesktop ? 'default' : 'small'}
|
||||
aria-label="love"
|
||||
color="primary"
|
||||
/>
|
||||
{config.enableFavourites && (
|
||||
<LoveButton
|
||||
className={classes.loveButton}
|
||||
record={record}
|
||||
resource={'album'}
|
||||
size={isDesktop ? 'default' : 'small'}
|
||||
aria-label="love"
|
||||
color="primary"
|
||||
/>
|
||||
)}
|
||||
</Typography>
|
||||
<Typography component="h6">
|
||||
<ArtistLinkField record={record} />
|
||||
|
||||
Reference in New Issue
Block a user