Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
petitminion
funkwhale
Commits
8950988d
Commit
8950988d
authored
Jul 30, 2018
by
Renon
Browse files
add duration in track table
parent
675afa2f
Changes
3
Hide whitespace changes
Inline
Side-by-side
changes/changelog.d/461.enhancement
0 → 100644
View file @
8950988d
Display track duration in track tables (#461)
front/src/components/audio/track/Row.vue
View file @
8950988d
...
...
@@ -15,7 +15,7 @@
{{ track.title }}
</router-link>
</td>
<td
colspan=
"
6
"
>
<td
colspan=
"
4
"
>
<router-link
v-if=
"track.artist.id === albumArtist.id"
class=
"artist discrete link"
:to=
"{name: 'library.artists.detail', params: {id: track.artist.id }}"
>
{{ track.artist.name }}
</router-link>
...
...
@@ -29,11 +29,17 @@
</router-link>
</
template
>
</td>
<td
colspan=
"
6
"
>
<td
colspan=
"
4
"
>
<router-link
class=
"album discrete link"
:to=
"{name: 'library.albums.detail', params: {id: track.album.id }}"
>
{{ track.album.title }}
</router-link>
</td>
<td
colspan=
"4"
v-if=
"file && file.duration"
>
{{ time.parse(file.duration) }}
</td>
<td
colspan=
"4"
v-else
>
<translate>
N/A
</translate>
</td>
<td>
<track-favorite-icon
class=
"favorite-icon"
:track=
"track"
></track-favorite-icon>
<track-playlist-icon
...
...
@@ -44,6 +50,8 @@
</template>
<
script
>
import
time
from
'
@/utils/time
'
import
TrackFavoriteIcon
from
'
@/components/favorites/TrackFavoriteIcon
'
import
TrackPlaylistIcon
from
'
@/components/playlists/TrackPlaylistIcon
'
import
PlayButton
from
'
@/components/audio/PlayButton
'
...
...
@@ -59,6 +67,11 @@ export default {
TrackPlaylistIcon
,
PlayButton
},
data
()
{
return
{
time
}
},
computed
:
{
albumArtist
()
{
if
(
this
.
artist
)
{
...
...
@@ -66,6 +79,9 @@ export default {
}
else
{
return
this
.
track
.
album
.
artist
}
},
file
()
{
return
this
.
track
.
files
[
0
]
}
}
}
...
...
front/src/components/audio/track/Table.vue
View file @
8950988d
...
...
@@ -5,8 +5,9 @@
<th></th>
<th></th>
<th
colspan=
"6"
><translate>
Title
</translate></th>
<th
colspan=
"6"
><translate>
Artist
</translate></th>
<th
colspan=
"6"
><translate>
Album
</translate></th>
<th
colspan=
"4"
><translate>
Artist
</translate></th>
<th
colspan=
"4"
><translate>
Album
</translate></th>
<th
colspan=
"4"
><translate>
Duration
</translate></th>
<th></th>
</tr>
</thead>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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