-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add upload date in List View #15
Conversation
@@ -49,6 +49,11 @@ | |||
white-space: nowrap; | |||
text-overflow: ellipsis; | |||
} | |||
.upload-date { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Selector should have depth of applicability no greater than 2, but was 3
@@ -90,7 +90,7 @@ class SongList extends Component { | |||
] | |||
return ( | |||
<ContextMenuTrigger id={ song.hash || song.hashMd5 }> | |||
<SongListItem key={ makeRenderKey(songTags) } title={ song.songName } ratings={ song.ratings } artist={ song.authorName } uploader={ song.uploader } difficulties={ song.difficulties || song.difficultyLevels } imageSource={ song.coverUrl } songKey={ song.key } hash={ song.hash || song.hashMd5 } file={ song.file } downloads={ song.downloadCount } upvotes={ song.upVotes } downvotes={ song.downVotes } plays={ song.playedCount } /> | |||
<SongListItem key={ makeRenderKey(songTags) } title={ song.songName } ratings={ song.ratings } artist={ song.authorName } uploader={ song.uploader } difficulties={ song.difficulties || song.difficultyLevels } imageSource={ song.coverUrl } songKey={ song.key } hash={ song.hash || song.hashMd5 } file={ song.file } downloads={ song.downloadCount } upvotes={ song.upVotes } downvotes={ song.downVotes } plays={ song.playedCount } uploadDate={ !!song.createdAt && !!song.createdAt.date && !!song.createdAt.timezone ? new Date(Date.parse(song.createdAt.date + " " + song.createdAt.timezone)).toLocaleString() : '' } /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not the best place to parse the date, but I didn't really know where else to do it
@JtheDroid Do you think it would look better as:
or
|
@StarGazer1258 I personally think
looks better/makes more sense But maybe the date could go somewhere else, that position was just my first idea |
Adds the upload date in the List View as requested in Issue #13
Not displayed in Compact or Grid Views
Before:
After:
Date is formatted using the computer's default locale
Example: German locale:
Feel free to change anything