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 {
|
||||
SongDatagrid,
|
||||
SongDetails,
|
||||
SongTitleField,
|
||||
RatingField,
|
||||
} from '../common'
|
||||
import { AddToPlaylistDialog } from '../dialogs'
|
||||
import { QualityInfo } from '../common/QualityInfo'
|
||||
@@ -63,11 +64,17 @@ const useStyles = makeStyles(
|
||||
'& $contextMenu': {
|
||||
visibility: 'visible',
|
||||
},
|
||||
'& $ratingField': {
|
||||
visibility: 'visible',
|
||||
},
|
||||
},
|
||||
},
|
||||
contextMenu: {
|
||||
visibility: (props) => (props.isDesktop ? 'hidden' : 'visible'),
|
||||
},
|
||||
ratingField: {
|
||||
visibility: 'hidden',
|
||||
},
|
||||
}),
|
||||
{ name: 'RaList' }
|
||||
)
|
||||
@@ -121,6 +128,14 @@ const AlbumSongs = (props) => {
|
||||
{isDesktop && <TextField source="artist" sortable={false} />}
|
||||
<DurationField source="duration" sortable={false} />
|
||||
<QualityInfo source="quality" sortable={false} />
|
||||
{isDesktop && config.enableStarRating && (
|
||||
<RatingField
|
||||
source="rating"
|
||||
resource={'albumSong'}
|
||||
sortable={false}
|
||||
className={classes.ratingField}
|
||||
/>
|
||||
)}
|
||||
<SongContextMenu
|
||||
source={'starred'}
|
||||
sortable={false}
|
||||
|
||||
Reference in New Issue
Block a user