Deselect multiple (context menu); Track on mobile - need to polish font spacing
This commit is contained in:
@ -329,7 +329,7 @@ class ContextMenu extends React.Component{
|
||||
return (
|
||||
<div className="context-menu__title">
|
||||
<div className="context-menu__title__text">
|
||||
{context.items_count} {context.nice_name}{context.items_count > 1 ? 's' : null} selected
|
||||
{context.items_count} {context.nice_name}{context.items_count > 1 ? 's' : null} selected <span className="context-menu__title__deselect" onClick={e => {this.props.uiActions.setSelectedTracks([]); this.props.uiActions.hideContextMenu()}}><Icon name="close" /></span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@ -350,7 +350,7 @@ class TrackList extends React.Component{
|
||||
}
|
||||
|
||||
// Accommodate a single key
|
||||
let singleton = false
|
||||
var singleton = false
|
||||
if (!(keys instanceof Array)){
|
||||
singleton = true
|
||||
keys = [keys]
|
||||
@ -358,20 +358,21 @@ class TrackList extends React.Component{
|
||||
|
||||
// Construct a basic track object, based on our unique track key
|
||||
// This is enough to perform interactions (dragging, selecting, etc)
|
||||
let array = []
|
||||
for (let i = 0; i < keys.length; i++){
|
||||
let key = keys[i].split('@@')
|
||||
var array = [];
|
||||
for (var key of keys){
|
||||
var key_components = key.split('@@')
|
||||
|
||||
if (indexes_only){
|
||||
array.push(key[0])
|
||||
array.push(key_components[0])
|
||||
|
||||
} else {
|
||||
array.push({
|
||||
index: parseInt(key[0]),
|
||||
tlid: parseInt(key[1]),
|
||||
uri: key[2],
|
||||
context: key[3],
|
||||
context_uri: key[4]
|
||||
key: key,
|
||||
index: parseInt(key_components[0]),
|
||||
tlid: parseInt(key_components[1]),
|
||||
uri: key_components[2],
|
||||
context: key_components[3],
|
||||
context_uri: key_components[4]
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -197,7 +197,7 @@ class Track extends React.Component{
|
||||
if (!this.props.track){
|
||||
return null
|
||||
} else {
|
||||
var track = this.props.track;
|
||||
var track = helpers.collate(this.props.track, {tracks: this.props.tracks, artists: this.props.artists, albums: this.props.albums});
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user