Mobile view; Browser dragging issues
This commit is contained in:
@ -46,6 +46,15 @@ class Dragger extends React.Component{
|
||||
position_y: e.clientY
|
||||
})
|
||||
|
||||
var dropzones = document.getElementsByClassName('dropzone')
|
||||
for( var i = 0; i < dropzones.length; i++ ){
|
||||
dropzones[i].classList.remove('hover')
|
||||
}
|
||||
|
||||
if( e.target.classList.contains('dropzone') && !e.target.classList.contains('hover') ){
|
||||
e.target.className += ' hover'
|
||||
}
|
||||
|
||||
// if not already, activate
|
||||
if( !this.props.dragger.active ) this.props.uiActions.dragActive()
|
||||
}
|
||||
|
||||
@ -171,7 +171,7 @@ export default function reducer(ui = {}, action){
|
||||
var images = ui.artist.images
|
||||
if( images.length <= 0 ) images = action.data.image
|
||||
|
||||
var artist = Object.assign({}, ui.artist, { images: images, bio: action.data.bio }, )
|
||||
var artist = Object.assign({}, ui.artist, { images: images, bio: action.data.bio, listeners: parseInt(action.data.stats.listeners), on_tour: action.data.ontour }, )
|
||||
return Object.assign({}, ui, { artist: artist });
|
||||
|
||||
case 'SPOTIFY_ARTIST_LOADED':
|
||||
|
||||
@ -81,7 +81,10 @@ class Album extends React.Component{
|
||||
</div>
|
||||
|
||||
<ul className="details">
|
||||
<li>{ this.props.album.tracks_total } tracks, <Dater type="total-time" data={this.props.album.tracks} /></li>
|
||||
<li>
|
||||
{ this.props.album.tracks_total } tracks,
|
||||
{ this.props.album.tracks ? <Dater type="total-time" data={this.props.album.tracks} /> : null }
|
||||
</li>
|
||||
{ this.props.album.release_date ? <li>Released <Dater type="date" data={ this.props.album.release_date } /></li> : null }
|
||||
<li><FontAwesome name={helpers.sourceIcon( this.props.params.uri )} /> {helpers.uriSource( this.props.params.uri )} playlist</li>
|
||||
</ul>
|
||||
|
||||
@ -168,9 +168,11 @@ class Artist extends React.Component{
|
||||
</div>
|
||||
|
||||
<ul className="details">
|
||||
{ this.props.artist.followers ? <li>{ this.props.artist.followers.total.toLocaleString() } followers</li> : null }
|
||||
{ this.props.artist.popularity ? <li>{ this.props.artist.popularity }% popularity</li> : null }
|
||||
{ scheme == 'local' ? <li>{ this.props.artist.albums.length.toLocaleString() } albums</li> : null }
|
||||
<li>
|
||||
{ this.props.artist.followers ? <span>{ this.props.artist.followers.total.toLocaleString() } followers, </span> : null }
|
||||
{ this.props.artist.popularity ? <span>{ this.props.artist.popularity }% popularity</span> : null }
|
||||
{ scheme == 'local' ? <span>{ this.props.artist.listeners.toLocaleString() } listeners</span> : null }
|
||||
</li>
|
||||
{ scheme == 'spotify' ? <li><FontAwesome name='spotify' /> Spotify artist</li> : null }
|
||||
{ scheme == 'local' ? <li><FontAwesome name='folder' /> Local artist</li> : null }
|
||||
</ul>
|
||||
|
||||
@ -144,7 +144,10 @@ class Playlist extends React.Component{
|
||||
</div>
|
||||
|
||||
<ul className="details">
|
||||
<li>{ this.props.playlist.tracks_total } tracks, <Dater type="total-time" data={this.props.playlist.tracks} /></li>
|
||||
<li>
|
||||
{ this.props.playlist.tracks_total } tracks,
|
||||
{ this.props.playlist.tracks ? <Dater type="total-time" data={this.props.playlist.tracks} /> : null }
|
||||
</li>
|
||||
{ this.props.playlist.last_modified ? <li>Updated <Dater type="ago" data={this.props.playlist.last_modified} /> ago</li> : null }
|
||||
{ this.props.playlist.followers ? <li>{this.props.playlist.followers.total.toLocaleString()} followers</li> : null }
|
||||
{ scheme == 'spotify' && this.props.playlist.owner ? <li>By <Link to={'/user/'+this.props.playlist.owner.uri}>{this.props.playlist.owner.id}</Link> { !this.props.playlist.public ? <FontAwesome name="lock" /> : null }</li> : null }
|
||||
|
||||
Reference in New Issue
Block a user