Everything goes through Icon now

This commit is contained in:
James Barnsley
2018-05-20 20:42:20 +12:00
parent 8bdb49b3d5
commit 2e2df58100
61 changed files with 23925 additions and 25819 deletions

View File

@ -2,7 +2,6 @@
import React, { PropTypes } from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import FontAwesome from 'react-fontawesome'
import Header from '../components/Header'
import TrackList from '../components/TrackList'
@ -154,7 +153,7 @@ class Album extends React.Component{
<h1>{ this.props.album.name }</h1>
<ul className="details">
{ !this.props.slim_mode ? <li className="has-tooltip"><FontAwesome name={helpers.sourceIcon(this.props.params.uri )} /><span className="tooltip">{helpers.uriSource(this.props.params.uri )} {this.props.album.album_type ? this.props.album.album_type : 'album'}</span></li> : null }
{ !this.props.slim_mode ? <li className="has-tooltip"><Icon type="fontawesome" name={helpers.sourceIcon(this.props.params.uri )} /><span className="tooltip">{helpers.uriSource(this.props.params.uri )} {this.props.album.album_type ? this.props.album.album_type : 'album'}</span></li> : null }
{ !this.props.slim_mode && artists.length > 0 ? <li><ArtistSentence artists={artists} /></li> : null }
{ this.props.album.date ? <li><Dater type="date" data={ this.props.album.date } /></li> : null }
<li>

View File

@ -3,7 +3,6 @@ import React, { PropTypes } from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import { Link } from 'react-router'
import FontAwesome from 'react-fontawesome'
import LazyLoadListener from '../components/LazyLoadListener'
import Header from '../components/Header'
@ -157,9 +156,9 @@ class Artist extends React.Component{
<div className="col w40 tiles artist-stats">
{this.props.artist.images ? <div className="tile thumbnail-wrapper"><Thumbnail size="huge" canZoom images={this.props.artist.images} /></div> : null}
{this.props.artist.images_additional ? <div className="tile thumbnail-wrapper"><Thumbnail size="huge" canZoom images={this.props.artist.images_additional} /></div> : null}
{this.props.artist.followers ? <div className="tile"><span className="content"><FontAwesome name="users" />{this.props.artist.followers.total.toLocaleString() } followers</span></div> : null}
{this.props.artist.popularity ? <div className="tile"><span className="content"><FontAwesome name="fire" />{this.props.artist.popularity }% popularity</span></div> : null}
{this.props.artist.listeners ? <div className="tile"><span className="content"><FontAwesome name="headphones" />{ this.props.artist.listeners.toLocaleString() } listeners</span></div> : null }
{this.props.artist.followers ? <div className="tile"><span className="content"><Icon type="fontawesome" name="users" />{this.props.artist.followers.total.toLocaleString() } followers</span></div> : null}
{this.props.artist.popularity ? <div className="tile"><span className="content"><Icon type="fontawesome" name="fire" />{this.props.artist.popularity }% popularity</span></div> : null}
{this.props.artist.listeners ? <div className="tile"><span className="content"><Icon type="fontawesome" name="headphones" />{ this.props.artist.listeners.toLocaleString() } listeners</span></div> : null }
</div>
<div className="col w60 biography">

View File

@ -3,7 +3,6 @@ import React, { PropTypes } from 'react'
import { connect } from 'react-redux'
import { Link, hashHistory } from 'react-router'
import { bindActionCreators } from 'redux'
import FontAwesome from 'react-fontawesome'
import Header from '../components/Header'
import Thumbnail from '../components/Thumbnail'

View File

@ -3,7 +3,6 @@ import React, { PropTypes } from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import { Link } from 'react-router'
import FontAwesome from 'react-fontawesome'
import ReactGA from 'react-ga'
import TrackList from '../components/TrackList'
@ -207,7 +206,7 @@ class Playlist extends React.Component{
{ this.props.playlist.description ? <h2 className="description grey-text" dangerouslySetInnerHTML={{__html: this.props.playlist.description}}></h2> : null }
<ul className="details">
{ !this.props.slim_mode ? <li className="has-tooltip"><FontAwesome name={helpers.sourceIcon(this.props.params.uri )} /><span className="tooltip">{helpers.uriSource(this.props.params.uri)} playlist</span></li> : null }
{ !this.props.slim_mode ? <li className="has-tooltip"><Icon type="fontawesome" name={helpers.sourceIcon(this.props.params.uri )} /><span className="tooltip">{helpers.uriSource(this.props.params.uri)} playlist</span></li> : null }
{ this.props.playlist.owner && !this.props.slim_mode ? <li><URILink type="user" uri={this.props.playlist.owner.uri}>{this.props.playlist.owner.id}</URILink></li> : null }
{ this.props.playlist.followers ? <li>{this.props.playlist.followers.total.toLocaleString()} followers</li> : null }
{ this.props.playlist.last_modified ? <li>Edited <Dater type="ago" data={this.props.playlist.last_modified} /></li> : null }

View File

@ -3,7 +3,6 @@ import React, { PropTypes } from 'react'
import { connect } from 'react-redux'
import { hashHistory, Link } from 'react-router'
import { bindActionCreators } from 'redux'
import FontAwesome from 'react-fontawesome'
import Icon from '../components/Icon'
import Parallax from '../components/Parallax'
@ -141,21 +140,17 @@ class Queue extends React.Component{
var options = (
<span>
{this.props.spotify_enabled ? <button className="no-hover" onClick={e => this.props.uiActions.openModal('edit_radio')}>
<Icon name="radio" />&nbsp;
Radio
<Icon name="radio" />Radio
{this.props.radio && this.props.radio.enabled ? <span className="flag blue">On</span> : null}
</button> : null}
<button className="no-hover" onClick={e => hashHistory.push(global.baseURL+'queue/history')}>
<Icon name="history" />&nbsp;
History
<Icon name="history" />History
</button>
<button className="no-hover" onClick={e => {this.props.mopidyActions.clearTracklist(); this.props.uiActions.hideContextMenu();}}>
<Icon name="delete_sweep" />&nbsp;
Clear
<Icon name="delete_sweep" />Clear
</button>
<button className="no-hover" onClick={e => this.props.uiActions.openModal('add_to_queue', {})}>
<Icon name="playlist_add" />&nbsp;
Add URI
<Icon name="playlist_add" />Add URI
</button>
</span>
)

View File

@ -3,7 +3,6 @@ import React, { PropTypes } from 'react'
import { connect } from 'react-redux'
import { hashHistory } from 'react-router'
import { bindActionCreators } from 'redux'
import FontAwesome from 'react-fontawesome'
import TrackList from '../components/TrackList'
import Header from '../components/Header'

View File

@ -3,7 +3,6 @@ import React, { PropTypes } from 'react'
import { connect } from 'react-redux'
import { Link, hashHistory } from 'react-router'
import { bindActionCreators } from 'redux'
import FontAwesome from 'react-fontawesome'
import ReactGA from 'react-ga'
import Header from '../components/Header'
@ -167,7 +166,7 @@ class Search extends React.Component{
<URILink unencoded type="search" uri={"search:all:"+term}>
Search
</URILink>
&nbsp; <FontAwesome name="angle-right" />&nbsp;
&nbsp; <Icon type="fontawesome" name="angle-right" />&nbsp;
Artists
</h4>
<section className="grid-wrapper">
@ -185,7 +184,7 @@ class Search extends React.Component{
<URILink unencoded type="search" uri={"search:all:"+term}>
Search
</URILink>
&nbsp; <FontAwesome name="angle-right" />&nbsp;
&nbsp; <Icon type="fontawesome" name="angle-right" />&nbsp;
Albums
</h4>
<section className="grid-wrapper">
@ -203,7 +202,7 @@ class Search extends React.Component{
<URILink unencoded type="search" uri={"search:all:"+term}>
Search
</URILink>
&nbsp; <FontAwesome name="angle-right" />&nbsp;
&nbsp; <Icon type="fontawesome" name="angle-right" />&nbsp;
Playlists
</h4>
<section className="grid-wrapper">
@ -221,7 +220,7 @@ class Search extends React.Component{
<URILink unencoded type="search" uri={"search:all:"+term}>
Search
</URILink>
&nbsp; <FontAwesome name="angle-right" />&nbsp;
&nbsp; <Icon type="fontawesome" name="angle-right" />&nbsp;
Tracks
</h4>
<section className="list-wrapper">

View File

@ -3,7 +3,6 @@ import React, { PropTypes } from 'react'
import { connect } from 'react-redux'
import { hashHistory, Link } from 'react-router'
import { bindActionCreators } from 'redux'
import FontAwesome from 'react-fontawesome'
import ConfirmationButton from '../components/Fields/ConfirmationButton'
import PusherConnectionList from '../components/PusherConnectionList'
@ -104,11 +103,11 @@ class Settings extends React.Component {
renderServerStatus(){
var colour = 'grey';
var icon = 'question-circle';
var icon = 'help';
var status = 'Unknown';
if (this.props.mopidy.connecting || this.props.pusher.connecting){
icon = 'plug';
icon = 'autorenew';
status = 'Connecting...'
} else if (!this.props.mopidy.connected || !this.props.pusher.connected){
colour = 'red';
@ -122,7 +121,7 @@ class Settings extends React.Component {
return (
<span className={colour+'-text'}>
<FontAwesome name={icon} />&nbsp; {status}
<Icon name={icon} />{status}
</span>
);
}
@ -271,7 +270,7 @@ class Settings extends React.Component {
<div className="name">Version</div>
<div className="input">
<span className="text">
{this.props.pusher.version.current} installed {this.props.pusher.version.upgrade_available ? <span className="flag blue">Upgrade available</span> : <span className="flag dark"><FontAwesome name="check" className="green-text" />&nbsp; Up-to-date</span>}
{this.props.pusher.version.current} installed {this.props.pusher.version.upgrade_available ? <span className="flag blue">Upgrade available</span> : <span className="flag dark"><Icon type="fontawesome" name="check" className="green-text" />&nbsp; Up-to-date</span>}
</span>
</div>
</div>
@ -295,14 +294,14 @@ class Settings extends React.Component {
<br /><br />
<div>
<a className="button" href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=james%40barnsley%2enz&lc=NZ&item_name=James%20Barnsley&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted" target="_blank">
<FontAwesome name="paypal" />&nbsp;Donate
<Icon type="fontawesome" name="paypal" />&nbsp;Donate
</a>
&nbsp;&nbsp;
<a className="button" href="https://github.com/jaedb/Iris" target="_blank">
<FontAwesome name="github" />&nbsp;GitHub
<Icon type="fontawesome" name="github" />&nbsp;GitHub
</a>
&nbsp;&nbsp;
<a className="button" href="http://creativecommons.org/licenses/by-nc/4.0/" target="_blank"><FontAwesome name="creative-commons" />&nbsp;Licence</a>
<a className="button" href="http://creativecommons.org/licenses/by-nc/4.0/" target="_blank"><Icon type="fontawesome" name="creative-commons" />&nbsp;Licence</a>
</div>
</div>

View File

@ -3,7 +3,6 @@ import React, { PropTypes } from 'react'
import { connect } from 'react-redux'
import { Link } from 'react-router'
import { bindActionCreators } from 'redux'
import FontAwesome from 'react-fontawesome'
import Header from '../components/Header'
import TrackList from '../components/TrackList'
@ -232,7 +231,7 @@ class Track extends React.Component{
</h2>
<ul className="details">
{!this.props.slim_mode ? <li className="has-tooltip"><FontAwesome name={helpers.sourceIcon(this.props.params.uri)} /><span className="tooltip">{helpers.uriSource(this.props.params.uri)} track</span></li> : null}
{!this.props.slim_mode ? <li className="has-tooltip"><Icon type="fontawesome" name={helpers.sourceIcon(this.props.params.uri)} /><span className="tooltip">{helpers.uriSource(this.props.params.uri)} track</span></li> : null}
{track.date ? <li><Dater type="date" data={track.date} /></li> : null}
{track.explicit ? <li><span className="flag dark">EXPLICIT</span></li> : null}
<li>

View File

@ -2,7 +2,6 @@
import React, { PropTypes } from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import FontAwesome from 'react-fontawesome'
import Thumbnail from '../components/Thumbnail'
import PlaylistGrid from '../components/PlaylistGrid'

View File

@ -2,7 +2,6 @@
import React, { PropTypes } from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import FontAwesome from 'react-fontawesome'
import InputRange from 'react-input-range';
import Header from '../../components/Header'
@ -312,7 +311,7 @@ class Discover extends React.Component{
{seed.images ? <URILink className="thumbnail-wrapper" type={type} uri={seed.uri}><Thumbnail images={seed.images} circle={seed.type == "artist"} size="small" /></URILink> : null}
<div className="label">
{helpers.titleCase(type)}
<FontAwesome name="close" className="remove" onClick={() => this.removeSeed(index)} />
<Icon type="fontawesome" name="close" className="remove" onClick={() => this.removeSeed(index)} />
</div>
<div className="name">{seed.name}</div>
</div>
@ -369,7 +368,7 @@ class Discover extends React.Component{
<div className="label">
{helpers.titleCase(tunability.name)}
<span className="remove" onClick={e => this.toggleTunability(tunability.name)}>
<FontAwesome name="close" />
<Icon type="fontawesome" name="close" />
</span>
</div>
<div className="input">
@ -519,7 +518,7 @@ class Discover extends React.Component{
<AddSeedField onSelect={(e,uri) => this.handleSelect(e,uri)} />
<DropdownField className="add-properties" name="Properties" options={addable_tunabilities} no_status_icon button="default" handleChange={val => {this.toggleTunability(val)}} />
<span className={"submit button primary large"+(is_loading ? " working" : "")} onClick={e => this.getRecommendations()}>
<FontAwesome name="compass" />&nbsp;
<Icon type="fontawesome" name="compass" />&nbsp;
Find recommendations
</span>

View File

@ -3,7 +3,6 @@ import React, { PropTypes } from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import { Link, hashHistory } from 'react-router'
import FontAwesome from 'react-fontawesome'
import Header from '../../components/Header'
import List from '../../components/List'

View File

@ -3,7 +3,6 @@ import React, { PropTypes } from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import { Link } from 'react-router'
import FontAwesome from 'react-fontawesome'
import PlaylistGrid from '../../components/PlaylistGrid'
import List from '../../components/List'

View File

@ -3,7 +3,6 @@ import React, { PropTypes } from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import { Link } from 'react-router'
import FontAwesome from 'react-fontawesome'
import TrackList from '../../components/TrackList'
import Header from '../../components/Header'