Refactored the current ️/Star feature to ❤️/Love/Favourite feature. (#908)

* Added setRating feature to AlbumListView

* Refactored the iconography from  to ❤️

* Refactored the current component from StarButton to LoveButton

* Refactored all translations from Starred to Loved, and all props from showStar to showLove

* Refactored useToggleStar hook to useToggleLove

* rebased repository from master and removed stray commmits

* Refactored handler name from TOGGLE_STAR to TOGGLE_LOVE in PlayerToolbar.js

* Change "starred" translation to "Favorite"

Co-authored-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Neil Chauhan
2021-03-27 09:26:19 +05:30
committed by GitHub
parent db208600e4
commit ac37bf3631
16 changed files with 70 additions and 71 deletions
+5 -5
View File
@@ -8,7 +8,7 @@ import MoreVertIcon from '@material-ui/icons/MoreVert'
import clsx from 'clsx'
import { playNext, addTracks, setTrack, openAddToPlaylist } from '../actions'
import subsonic from '../subsonic'
import { StarButton } from './StarButton'
import { LoveButton } from './LoveButton'
import config from '../config'
import { formatBytes } from '../utils'
@@ -21,7 +21,7 @@ const useStyles = makeStyles({
export const SongContextMenu = ({
resource,
record,
showStar,
showLove,
onAddToPlaylist,
className,
}) => {
@@ -87,7 +87,7 @@ export const SongContextMenu = ({
return (
<span className={clsx(classes.noWrap, className)}>
<StarButton record={record} resource={resource} visible={showStar} />
<LoveButton record={record} resource={resource} visible={showLove} />
<IconButton onClick={handleClick} size={'small'}>
<MoreVertIcon fontSize={'small'} />
</IconButton>
@@ -114,13 +114,13 @@ SongContextMenu.propTypes = {
resource: PropTypes.string.isRequired,
record: PropTypes.object.isRequired,
onAddToPlaylist: PropTypes.func,
showStar: PropTypes.bool,
showLove: PropTypes.bool,
}
SongContextMenu.defaultProps = {
onAddToPlaylist: () => {},
record: {},
resource: 'song',
showStar: true,
showLove: true,
addLabel: true,
}