Search display
This commit is contained in:
@ -8,6 +8,7 @@ import FontAwesome from 'react-fontawesome'
|
||||
import Thumbnail from './Thumbnail'
|
||||
import ArtistSentence from './ArtistSentence'
|
||||
|
||||
import * as helpers from '../helpers'
|
||||
import * as uiActions from '../services/ui/actions'
|
||||
|
||||
class AlbumGrid extends React.Component{
|
||||
@ -48,9 +49,12 @@ class AlbumGrid extends React.Component{
|
||||
onClick={ (e) => this.handleClick(e,global.baseURL+'album/'+album.uri) }
|
||||
onContextMenu={e => this.handleContextMenu(e,album)}>
|
||||
<Thumbnail size="medium" images={album.images} />
|
||||
<div className="name">{ album.name }</div>
|
||||
<div className="name">
|
||||
{album.name}
|
||||
{this.props.show_source_icon ? <FontAwesome name={helpers.sourceIcon(album.uri)} className="source" fixedWidth /> : null}
|
||||
</div>
|
||||
<div className="secondary">
|
||||
{ album.artists ? <ArtistSentence artists={album.artists} /> : <span>-</span> }
|
||||
{album.artists ? <ArtistSentence artists={album.artists} /> : <span>-</span>}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@ -3,9 +3,11 @@ import React, { PropTypes } from 'react'
|
||||
import { connect } from 'react-redux'
|
||||
import { createStore, bindActionCreators } from 'redux'
|
||||
import { Link } from 'react-router'
|
||||
import FontAwesome from 'react-fontawesome'
|
||||
|
||||
import Thumbnail from './Thumbnail'
|
||||
|
||||
import * as helpers from '../helpers'
|
||||
import * as uiActions from '../services/ui/actions'
|
||||
|
||||
class ArtistGrid extends React.Component{
|
||||
@ -41,7 +43,10 @@ class ArtistGrid extends React.Component{
|
||||
key={index}
|
||||
onContextMenu={e => this.handleContextMenu(e,artist)}>
|
||||
<Thumbnail size="medium" images={artist.images} />
|
||||
<div className="name">{ artist.name }</div>
|
||||
<div className="name">
|
||||
{artist.name}
|
||||
{this.props.show_source_icon ? <FontAwesome name={helpers.sourceIcon(artist.uri)} className="source" fixedWidth /> : null}
|
||||
</div>
|
||||
<div className="secondary">
|
||||
{artist.followers ? artist.followers.total.toLocaleString()+' followers' : null}
|
||||
{artist.albums_uris && !artist.followers ? artist.albums_uris.length+' albums' : null}
|
||||
|
||||
@ -7,6 +7,7 @@ import FontAwesome from 'react-fontawesome'
|
||||
|
||||
import Thumbnail from './Thumbnail'
|
||||
|
||||
import * as helpers from '../helpers'
|
||||
import * as uiActions from '../services/ui/actions'
|
||||
|
||||
class PlaylistGrid extends React.Component{
|
||||
@ -43,10 +44,13 @@ class PlaylistGrid extends React.Component{
|
||||
key={index}
|
||||
onContextMenu={e => this.handleContextMenu(e,playlist)}>
|
||||
<Thumbnail size="medium" images={playlist.images} />
|
||||
<div className="name">{ playlist.name }</div>
|
||||
<div className="name">
|
||||
{playlist.name}
|
||||
{this.props.show_source_icon ? <FontAwesome name={helpers.sourceIcon(playlist.uri)} className="source" fixedWidth /> : null}
|
||||
</div>
|
||||
<div className="secondary">
|
||||
{ playlist.tracks_total ? playlist.tracks_total+' tracks' : <span>0 tracks</span> }
|
||||
{ playlist.can_edit ? <FontAwesome name="edit" /> : null }
|
||||
{playlist.tracks_total ? playlist.tracks_total+' tracks' : <span>0 tracks</span>}
|
||||
{playlist.can_edit ? <FontAwesome name="edit" /> : null}
|
||||
</div>
|
||||
</Link>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user