Add 5-star rating system(#986)
* Added Star Rating functionality for Songs * Added Star Rating functionality for Artists * Added Star Rating functionality for AlbumListView * Added Star Rating functionality for AlbumDetails and improved typography for title * Added functionality to turn on/off Star Rating functionality for Songs * Added functionality to turn on/off Star Rating functionality for Artists * Added functionality to turn on/off Star Rating functionality for Albums * Added enableStarRating to server config * Resolved the bugs and improved the ratings functionality. * synced repo and removed duplicate key * changed the default rating size to small, and changed the color to match the theme. * Added translations for ratings, and Top Rated tab in side menu. * Changed rating translation to topRated in albumLists, and added has_rating filter to topRated. * Added empty stars icon to RatingField. * Added sortable=false in AlbumSongs and added sortByOrder=DESC in all List components. * Added translations for rating, for artists and albums, and removed the sortByOrder=DESC from SimpleLists.
This commit is contained in:
@@ -19,6 +19,7 @@ import {
|
||||
formatRange,
|
||||
SizeField,
|
||||
LoveButton,
|
||||
RatingField,
|
||||
} from '../common'
|
||||
import config from '../config'
|
||||
|
||||
@@ -167,7 +168,10 @@ const AlbumDetails = ({ record }) => {
|
||||
</div>
|
||||
<div className={classes.details}>
|
||||
<CardContent className={classes.content}>
|
||||
<Typography variant="h5" className={classes.recordName}>
|
||||
<Typography
|
||||
variant={isDesktop ? 'h5' : 'h6'}
|
||||
className={classes.recordName}
|
||||
>
|
||||
{record.name}
|
||||
{config.enableFavourites && (
|
||||
<LoveButton
|
||||
@@ -195,6 +199,13 @@ const AlbumDetails = ({ record }) => {
|
||||
{' · '}
|
||||
<SizeField record={record} source="size" />
|
||||
</Typography>
|
||||
{config.enableStarRating && (
|
||||
<RatingField
|
||||
record={record}
|
||||
resource={'album'}
|
||||
size={isDesktop ? 'medium' : 'small'}
|
||||
/>
|
||||
)}
|
||||
{isDesktop && record['comment'] && <AlbumComment record={record} />}
|
||||
</CardContent>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user