Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Maxence Bothorel
funkwhale
Commits
8ff775a1
Verified
Commit
8ff775a1
authored
Mar 20, 2018
by
Eliot Berriot
Browse files
Added tracks count and sort by modification date in front
parent
f917c5d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
front/src/components/playlists/PlaylistModal.vue
View file @
8ff775a1
...
...
@@ -18,7 +18,8 @@
<div
class=
"content"
>
<div
class=
"header"
>
{{
playlist
.
name
}}
</div>
<div
class=
"meta"
>
<span
class=
"tracks"
>
45 tracks
</span>
<span
class=
"tracks"
><i
class=
"music icon"
></i>
{{
playlist
.
tracks_count
}}
tracks
</span>
<span
class=
"date"
><i
class=
"clock icon"
></i>
Last modification
{{
playlist
.
modification_date
|
ago
}}
</span>
</div>
<div
class=
"extra"
>
<div
class=
"ui basic green button"
@
click=
"addToPlaylist(playlist.id)"
>
...
...
@@ -34,6 +35,7 @@
</
template
>
<
script
>
import
_
from
'
lodash
'
import
axios
from
'
axios
'
import
{
mapState
}
from
'
vuex
'
...
...
@@ -80,7 +82,9 @@ export default {
playlists
:
state
=>
state
.
playlists
.
playlists
}),
sortedPlaylists
()
{
return
this
.
playlists
let
p
=
_
.
sortBy
(
this
.
playlists
,
[(
e
)
=>
{
return
e
.
modification_date
}])
p
.
reverse
()
return
p
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment