fix: resolve compilation and type inference issues in torrent table after progress integration
Some checks failed
Build MIPS Binary / build (push) Failing after 36s
Some checks failed
Build MIPS Binary / build (push) Failing after 36s
This commit is contained in:
@@ -621,17 +621,24 @@ fn TorrentRow(
|
||||
{move || visible_columns.get().contains("Progress").then({
|
||||
let percent = t.percent_complete;
|
||||
let status = t.status.clone();
|
||||
move || view! {
|
||||
move || {
|
||||
let class = if status == shared::TorrentStatus::Error {
|
||||
"bg-destructive/20 [&>div]:bg-destructive".to_string()
|
||||
} else {
|
||||
"bg-secondary w-32".to_string()
|
||||
};
|
||||
view! {
|
||||
<DataTableCell>
|
||||
<div class="flex items-center gap-2">
|
||||
<Progress
|
||||
value=Signal::derive(move || percent)
|
||||
class=if status == shared::TorrentStatus::Error { "bg-destructive/20 [&>div]:bg-destructive".to_string() } else { "bg-secondary w-32".to_string() }
|
||||
class=class
|
||||
/>
|
||||
<span class="text-[10px] text-muted-foreground w-10 text-right">{format!("{:.1}%", percent)}</span>
|
||||
</div>
|
||||
</DataTableCell>
|
||||
}.into_any()
|
||||
}
|
||||
}
|
||||
}).into_any()}
|
||||
|
||||
{move || visible_columns.get().contains("Status").then({
|
||||
@@ -780,8 +787,8 @@ fn TorrentCard(
|
||||
</div>
|
||||
</div>
|
||||
</TorrentContextMenu>
|
||||
}.into_any()
|
||||
}.into_any()
|
||||
}
|
||||
}
|
||||
}
|
||||
</Show>
|
||||
}.into_any()
|
||||
|
||||
Reference in New Issue
Block a user