mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-25 06:27:59 +01:00
Using moment.js for publish date
This commit is contained in:
parent
d67ff0b888
commit
2cb093c78b
3 changed files with 12256 additions and 1663 deletions
|
@ -17,7 +17,7 @@
|
|||
</div>
|
||||
|
||||
<ul class="stats">
|
||||
<li>Published: <strong>{{::track.published_at}}</strong></li>
|
||||
<li>Published: <strong>{{formatPublishedDate(track)}}</strong></li>
|
||||
<li>Views: <strong>{{::track.stats.views}}</strong></li>
|
||||
<li>Plays: <strong>{{::track.stats.plays}}</strong></li>
|
||||
<li>Downloads: <strong>{{::track.stats.downloads}}</strong></li>
|
||||
|
|
|
@ -23,4 +23,8 @@ window.pfm.preloaders['track-show'] = [
|
|||
module.exports = angular.module('ponyfm').controller "track-show", [
|
||||
'$scope', 'tracks', '$state', 'playlists', 'auth', 'favourites', '$modal'
|
||||
($scope, tracks, $state, playlists, auth, favourites, $modal) ->
|
||||
$scope.formatPublishedDate = (track) ->
|
||||
locale = window.navigator.userLanguage || window.navigator.language
|
||||
moment.locale(locale)
|
||||
return moment(track.published_at).format('LLL')
|
||||
]
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue