Format duration

This commit is contained in:
Claudio Ortolina
2025-05-05 11:13:29 +01:00
parent dc5febfae4
commit 2d9a291445
3 changed files with 44 additions and 3 deletions
@@ -7,7 +7,8 @@ defmodule MusicLibraryWeb.CollectionLive.Show do
close_actions_menu: 1,
format_label: 1,
type_label: 1,
selected_release_label: 1
selected_release_label: 1,
format_duration: 1
]
alias MusicLibrary.Records
@@ -312,8 +312,10 @@
>
<div class="table-row">
<span class="table-cell text-xs text-right pr-1">{track.position}</span>
<span class="table-cell text-sm font-medium leading-6">{track.title}</span>
<span class="table-cell text-xs text-right pl-1">{track.length}</span>
<span class="table-cell text-xs font-medium leading-8">{track.title}</span>
<span class="table-cell text-xs text-right pl-2">
{format_duration(track.length)}
</span>
</div>
<div :if={release_with_tracks.artists !== track.artists} class="table-row text-xs">
<span class="table-cell" />