More icons; Cleaner tooltips

This commit is contained in:
James Barnsley
2018-02-16 08:52:43 +13:00
parent ed6d657c05
commit 5a8eca13be
30 changed files with 272 additions and 95 deletions

View File

@ -17,13 +17,13 @@ export default class Icon extends React.Component{
componentWillReceiveProps(newProps){
if (this.props.name !== newProps.name){
this.load();
this.load(newProps.name);
}
}
load(){
load(name = this.props.name){
var self = this;
var url = 'assets/icons/'+this.props.name+'.svg';
var url = 'assets/icons/'+name+'.svg';
var xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = function(){

View File

@ -91,8 +91,8 @@ class Sidebar extends React.Component{
<Link className={this.linkClassName('settings')} to={global.baseURL+"settings"}>
<Icon name="cog" />
Settings
{ this.props.test_mode ? <FontAwesome name="info-circle" className="orange-text pull-right" />: null}
{ !this.props.mopidy_connected || (!this.props.spotify_connected && this.props.spotify_enabled) || !this.props.pusher_connected ? <FontAwesome name="exclamation-triangle" className="red-text pull-right" /> : null }
{this.props.test_mode ? <span className="has-tooltip right-tooltip pull-right"><FontAwesome name="info-circle" className="orange-text" /><span className="tooltip">Test mode active</span></span>: null}
{!this.props.mopidy_connected || (!this.props.spotify_connected && this.props.spotify_enabled) || !this.props.pusher_connected ? <FontAwesome name="exclamation-triangle" className="red-text pull-right" /> : null}
</Link>
</section>