Debug and History as nested URLs; Loader for local views fixes #89
This commit is contained in:
@ -152,6 +152,17 @@ class LibraryLocalAlbums extends React.Component{
|
||||
</span>
|
||||
)
|
||||
|
||||
if (albums.length <= 0 && helpers.isLoading(this.props.load_queue,['mopidy_lookup','mopidy_browse'])){
|
||||
return (
|
||||
<div className="view library-local-view">
|
||||
<Header icon="music" title="Local albums" options={options} uiActions={this.props.uiActions} />
|
||||
<div className="body-loader">
|
||||
<div className="loader"></div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="view library-local-view">
|
||||
<Header icon="music" title="Local albums" options={options} uiActions={this.props.uiActions} />
|
||||
|
||||
@ -6,6 +6,7 @@ import { bindActionCreators } from 'redux'
|
||||
import Header from '../../components/Header'
|
||||
import List from '../../components/List'
|
||||
|
||||
import * as helpers from '../../helpers'
|
||||
import * as uiActions from '../../services/ui/actions'
|
||||
import * as mopidyActions from '../../services/mopidy/actions'
|
||||
import * as spotifyActions from '../../services/spotify/actions'
|
||||
@ -54,6 +55,17 @@ class LibraryLocalArtists extends React.Component{
|
||||
}
|
||||
}
|
||||
|
||||
if (artists.length <= 0 && helpers.isLoading(this.props.load_queue,['mopidy_lookup','mopidy_browse'])){
|
||||
return (
|
||||
<div className="view library-local-view">
|
||||
<Header icon="music" title="Local artists" />
|
||||
<div className="body-loader">
|
||||
<div className="loader"></div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="view library-local-view">
|
||||
<Header icon="music" title="Local artists" />
|
||||
|
||||
@ -9,6 +9,7 @@ import Header from '../../components/Header'
|
||||
import List from '../../components/List'
|
||||
import TrackList from '../../components/TrackList'
|
||||
|
||||
import * as helpers from '../../helpers'
|
||||
import * as mopidyActions from '../../services/mopidy/actions'
|
||||
import * as spotifyActions from '../../services/spotify/actions'
|
||||
|
||||
@ -67,10 +68,6 @@ class LibraryLocalDirectory extends React.Component{
|
||||
}
|
||||
|
||||
render(){
|
||||
if( !this.props.directory ) return null
|
||||
|
||||
var items = this.arrange_directory( this.props.directory )
|
||||
|
||||
var options = null
|
||||
if (this.props.params.uri != 'local:directory' ){
|
||||
options = (
|
||||
@ -81,6 +78,19 @@ class LibraryLocalDirectory extends React.Component{
|
||||
)
|
||||
}
|
||||
|
||||
if (!this.props.directory || helpers.isLoading(this.props.load_queue,['mopidy_browse'])){
|
||||
return (
|
||||
<div className="view library-local-view">
|
||||
<Header icon="music" title="Local files" options={options} uiActions={this.props.uiActions} />
|
||||
<div className="body-loader">
|
||||
<div className="loader"></div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
var items = this.arrange_directory( this.props.directory )
|
||||
|
||||
return (
|
||||
<div className="view library-local-view">
|
||||
<Header icon="music" title="Local files" options={options} uiActions={this.props.uiActions} />
|
||||
|
||||
Reference in New Issue
Block a user