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