From 99e9b54376da76a05d6d6f283dac440baa5683e9 Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Sun, 18 Sep 2016 21:46:40 +0200 Subject: [PATCH] Enhance playlist page * Do not display play next button on `/playlist` page. * Play on `/playlist` page jumps to the selected item instead of clearing the whole playlist. --- app/components/Songs.jsx | 29 +++++++++++++++++++---------- app/views/PlaylistPage.jsx | 2 +- public/fix.ie9.js.map | 2 +- public/index.js | 36 ++++++++++++++++++------------------ public/index.js.map | 2 +- 5 files changed, 40 insertions(+), 31 deletions(-) diff --git a/app/components/Songs.jsx b/app/components/Songs.jsx index bbaacee..d3d29ec 100644 --- a/app/components/Songs.jsx +++ b/app/components/Songs.jsx @@ -51,7 +51,9 @@ class SongsTableRowCSSIntl extends Component { */ onPlayNextClick() { $(this.refs.playNext).blur(); - this.props.playNextAction(this.props.song.get("id")); + if (this.props.playNextAction) { + this.props.playNextAction(this.props.song.get("id")); + } } render() { @@ -61,6 +63,18 @@ class SongsTableRowCSSIntl extends Component { const linkToArtist = "/artist/" + this.props.song.getIn(["artist", "id"]) + "-" + encodeURIComponent(this.props.song.getIn(["artist", "name"])); const linkToAlbum = linkToArtist + "/album/" + this.props.song.getIn(["album", "id"]) + "-" + encodeURIComponent(this.props.song.getIn(["album", "name"])); + let playNextButton = null; + if (this.props.playNextAction) { + playNextButton = ( + + ); + } + return ( @@ -70,12 +84,7 @@ class SongsTableRowCSSIntl extends Component {