mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-20 16:49:52 +00:00
Playlist track number fixes
This commit is contained in:
parent
bdb01aceab
commit
f3374f4d57
2 changed files with 5 additions and 3 deletions
|
|
@ -67,6 +67,7 @@
|
|||
padding-right: 3px;
|
||||
}
|
||||
#winamp2-js .playlist-track-numbers > div {
|
||||
text-align: center;
|
||||
padding-left: 1px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,17 +2,17 @@ import React from "react";
|
|||
import { connect } from "react-redux";
|
||||
|
||||
import { getTimeStr } from "../../utils";
|
||||
import { getVisibleTrackIds } from "../../selectors";
|
||||
import { getVisibleTrackIds, getScrollOffset } from "../../selectors";
|
||||
import TrackCell from "./TrackCell";
|
||||
|
||||
const TrackList = props => {
|
||||
const { trackIds, tracks } = props;
|
||||
const { trackIds, tracks, offset } = props;
|
||||
return (
|
||||
<div className="playlist-tracks">
|
||||
<div className="playlist-track-numbers">
|
||||
{trackIds.map((id, i) => (
|
||||
<TrackCell key={id} id={id}>
|
||||
{`${i + 1}.`}
|
||||
{`${i + 1 + offset}.`}
|
||||
</TrackCell>
|
||||
))}
|
||||
</div>
|
||||
|
|
@ -37,6 +37,7 @@ const TrackList = props => {
|
|||
const mapDispatchToProps = () => ({});
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
offset: getScrollOffset(state),
|
||||
trackIds: getVisibleTrackIds(state),
|
||||
tracks: state.tracks
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue