Update to artist credit handling
This commit is contained in:
@@ -46,7 +46,9 @@ pub fn library_page() -> Html {
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{ "Name" }</th>
|
||||
<th>{ "Status" }</th>
|
||||
<th>{ "Owned" }</th>
|
||||
<th>{ "Watched" }</th>
|
||||
<th>{ "Tracks" }</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -60,14 +62,30 @@ pub fn library_page() -> Html {
|
||||
<td>
|
||||
if a.total_items > 0 {
|
||||
<span class="text-sm" style={
|
||||
if a.total_owned == a.total_items { "color: var(--success);" }
|
||||
if a.total_owned >= a.total_watched && a.total_watched > 0 { "color: var(--success);" }
|
||||
else if a.total_owned > 0 { "color: var(--warning);" }
|
||||
else { "color: var(--accent);" }
|
||||
else { "color: var(--text-muted);" }
|
||||
}>
|
||||
{ format!("{}/{} owned", a.total_owned, a.total_items) }
|
||||
{ format!("{}/{}", a.total_owned, a.total_watched) }
|
||||
</span>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
if a.total_items > 0 {
|
||||
<span class="text-sm" style={
|
||||
if a.total_watched >= a.total_items { "color: var(--accent);" }
|
||||
else if a.total_watched > 0 { "color: var(--accent);" }
|
||||
else { "color: var(--text-muted);" }
|
||||
}>
|
||||
{ format!("{}/{}", a.total_watched, a.total_items) }
|
||||
</span>
|
||||
}
|
||||
</td>
|
||||
<td class="text-muted text-sm">
|
||||
if a.total_items > 0 {
|
||||
{ a.total_items }
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
})}
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user