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({
|
{move || visible_columns.get().contains("Progress").then({
|
||||||
let percent = t.percent_complete;
|
let percent = t.percent_complete;
|
||||||
let status = t.status.clone();
|
let status = t.status.clone();
|
||||||
move || view! {
|
move || {
|
||||||
<DataTableCell>
|
let class = if status == shared::TorrentStatus::Error {
|
||||||
<div class="flex items-center gap-2">
|
"bg-destructive/20 [&>div]:bg-destructive".to_string()
|
||||||
<Progress
|
} else {
|
||||||
value=Signal::derive(move || percent)
|
"bg-secondary w-32".to_string()
|
||||||
class=if status == shared::TorrentStatus::Error { "bg-destructive/20 [&>div]:bg-destructive".to_string() } else { "bg-secondary w-32".to_string() }
|
};
|
||||||
/>
|
view! {
|
||||||
<span class="text-[10px] text-muted-foreground w-10 text-right">{format!("{:.1}%", percent)}</span>
|
<DataTableCell>
|
||||||
</div>
|
<div class="flex items-center gap-2">
|
||||||
</DataTableCell>
|
<Progress
|
||||||
}.into_any()
|
value=Signal::derive(move || percent)
|
||||||
|
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({
|
{move || visible_columns.get().contains("Status").then({
|
||||||
@@ -780,8 +787,8 @@ fn TorrentCard(
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</TorrentContextMenu>
|
</TorrentContextMenu>
|
||||||
}.into_any()
|
}
|
||||||
}.into_any()
|
}
|
||||||
}
|
}
|
||||||
</Show>
|
</Show>
|
||||||
}.into_any()
|
}.into_any()
|
||||||
|
|||||||
Reference in New Issue
Block a user