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:
@@ -16,7 +16,7 @@ import {
|
||||
openAddToPlaylist,
|
||||
} from '../actions'
|
||||
import subsonic from '../subsonic'
|
||||
import { StarButton } from './StarButton'
|
||||
import { LoveButton } from './LoveButton'
|
||||
import config from '../config'
|
||||
import { formatBytes } from '../utils'
|
||||
|
||||
@@ -31,7 +31,7 @@ const useStyles = makeStyles({
|
||||
|
||||
const ContextMenu = ({
|
||||
resource,
|
||||
showStar,
|
||||
showLove,
|
||||
record,
|
||||
color,
|
||||
className,
|
||||
@@ -130,10 +130,10 @@ const ContextMenu = ({
|
||||
|
||||
return (
|
||||
<span className={clsx(classes.noWrap, className)}>
|
||||
<StarButton
|
||||
<LoveButton
|
||||
record={record}
|
||||
resource={resource}
|
||||
visible={showStar}
|
||||
visible={showLove}
|
||||
color={color}
|
||||
/>
|
||||
<IconButton
|
||||
@@ -183,11 +183,11 @@ AlbumContextMenu.propTypes = {
|
||||
record: PropTypes.object,
|
||||
discNumber: PropTypes.number,
|
||||
color: PropTypes.string,
|
||||
showStar: PropTypes.bool,
|
||||
showLove: PropTypes.bool,
|
||||
}
|
||||
|
||||
AlbumContextMenu.defaultProps = {
|
||||
showStar: true,
|
||||
showLove: true,
|
||||
addLabel: true,
|
||||
}
|
||||
|
||||
@@ -207,10 +207,10 @@ export const ArtistContextMenu = (props) =>
|
||||
ArtistContextMenu.propTypes = {
|
||||
record: PropTypes.object,
|
||||
color: PropTypes.string,
|
||||
showStar: PropTypes.bool,
|
||||
showLove: PropTypes.bool,
|
||||
}
|
||||
|
||||
ArtistContextMenu.defaultProps = {
|
||||
showStar: true,
|
||||
showLove: true,
|
||||
addLabel: true,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user