Tracks library, all part of fixing #324
This commit is contained in:
@ -6635,6 +6635,10 @@ main .track-view {
|
||||
.discover-view section .grid {
|
||||
padding-bottom: 20px; }
|
||||
|
||||
.discover-view section.tracks .pull-right .button,
|
||||
.discover-view section.tracks .pull-right button {
|
||||
margin-right: 0; }
|
||||
|
||||
@media (max-width: 800px) {
|
||||
.discover-view .intro {
|
||||
padding: 40px 20px; }
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
mopidy_iris/static/app.min.css
vendored
4
mopidy_iris/static/app.min.css
vendored
@ -6635,6 +6635,10 @@ main .track-view {
|
||||
.discover-view section .grid {
|
||||
padding-bottom: 20px; }
|
||||
|
||||
.discover-view section.tracks .pull-right .button,
|
||||
.discover-view section.tracks .pull-right button {
|
||||
margin-right: 0; }
|
||||
|
||||
@media (max-width: 800px) {
|
||||
.discover-view .intro {
|
||||
padding: 40px 20px; }
|
||||
|
||||
8
mopidy_iris/static/app.min.js
vendored
8
mopidy_iris/static/app.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -98,7 +98,7 @@
|
||||
|
||||
// Release details
|
||||
// These are automatically injected to built HTML
|
||||
var build = "1536884089";
|
||||
var build = "1536969338";
|
||||
var version = "3.25.1";
|
||||
|
||||
// Construct the script tag
|
||||
|
||||
@ -41,6 +41,7 @@ export default class LazyLoadListener extends React.Component{
|
||||
this.setState(
|
||||
{listening: false},
|
||||
() => {
|
||||
console.info('Loading more: '+this.props.loadKey);
|
||||
this.props.loadMore();
|
||||
}
|
||||
);
|
||||
|
||||
@ -589,8 +589,15 @@ const CoreMiddleware = (function(){
|
||||
}*/
|
||||
|
||||
if (raw_album.tracks){
|
||||
album.tracks_uris = helpers.arrayOf('uri', raw_album.tracks);
|
||||
tracks_loaded = [...tracks_loaded, ...raw_album.tracks];
|
||||
album.tracks_uris = [];
|
||||
|
||||
for (var track of raw_album.tracks){
|
||||
if (!track.album){
|
||||
track.album = helpers.formatSimpleObject(album);
|
||||
}
|
||||
album.tracks_uris.push(track.uri);
|
||||
tracks_loaded.push(track);
|
||||
}
|
||||
}
|
||||
|
||||
if (raw_album.artists){
|
||||
|
||||
@ -449,8 +449,10 @@ class Discover extends React.Component{
|
||||
<section className="col w70 tracks">
|
||||
<h4>
|
||||
Tracks
|
||||
<div className="pull-right">
|
||||
<ContextMenuTrigger onTrigger={e => this.handleContextMenu(e)} />
|
||||
<button className="primary pull-right" onClick={e => this.playTracks(e)}>Play all</button>
|
||||
<button className="primary" onClick={e => this.playTracks(e)}>Play all</button>
|
||||
</div>
|
||||
</h4>
|
||||
<TrackList className="discover-track-list" uri={uri} tracks={tracks} />
|
||||
</section>
|
||||
|
||||
@ -24,11 +24,9 @@ class LibraryTracks extends React.Component{
|
||||
componentDidMount(){
|
||||
this.props.uiActions.setWindowTitle("Tracks");
|
||||
|
||||
if (!this.props.spotify_enabled){
|
||||
if (!this.props.spotify_me){
|
||||
this.props.uiActions.createNotification({type: 'warning', content: 'Enable Spotify to browse tracks'});
|
||||
}
|
||||
|
||||
if (this.props.spotify_enabled && this.props.library_tracks === undefined){
|
||||
} else if (this.props.library_tracks === undefined){
|
||||
this.props.spotifyActions.getLibraryTracks();
|
||||
}
|
||||
}
|
||||
@ -107,7 +105,7 @@ const mapStateToProps = (state, ownProps) => {
|
||||
return {
|
||||
load_queue: state.ui.load_queue,
|
||||
tracks: state.core.tracks,
|
||||
spotify_enabled: (state.mopidy.uri_schemes && state.mopidy.uri_schemes.includes('spotify:')),
|
||||
spotify_me: state.spotify.me,
|
||||
library_tracks: state.spotify.library_tracks,
|
||||
library_tracks_more: state.spotify.library_tracks_more
|
||||
}
|
||||
|
||||
@ -193,6 +193,15 @@
|
||||
.grid {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
&.tracks {
|
||||
.pull-right {
|
||||
.button,
|
||||
button {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include responsive($bp_medium){
|
||||
|
||||
Reference in New Issue
Block a user