fix(frontend): fix statusbar type errors and store logic
This commit is contained in:
@@ -33,7 +33,7 @@ pub fn StatusBar() -> impl IntoView {
|
|||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75l3 3m0 0l3-3m-3 3v-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75l3 3m0 0l3-3m-3 3v-7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||||
</svg>
|
</svg>
|
||||||
<span class="font-mono">{move || format_speed(stats.get().down_rate)}</span>
|
<span class="font-mono">{move || format_speed(stats.get().down_rate)}</span>
|
||||||
<Show when=move || stats.get().down_limit.unwrap_or(0) > 0 fallback=|| ()>
|
<Show when=move || (stats.get().down_limit.unwrap_or(0) > 0) fallback=|| ()>
|
||||||
<span class="text-[10px] opacity-60">
|
<span class="text-[10px] opacity-60">
|
||||||
{move || format!("(Limit: {})", format_speed(stats.get().down_limit.unwrap_or(0)))}
|
{move || format!("(Limit: {})", format_speed(stats.get().down_limit.unwrap_or(0)))}
|
||||||
</span>
|
</span>
|
||||||
@@ -44,7 +44,7 @@ pub fn StatusBar() -> impl IntoView {
|
|||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15 11.25l-3-3m0 0l-3 3m3-3v7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15 11.25l-3-3m0 0l-3 3m3-3v7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||||
</svg>
|
</svg>
|
||||||
<span class="font-mono">{move || format_speed(stats.get().up_rate)}</span>
|
<span class="font-mono">{move || format_speed(stats.get().up_rate)}</span>
|
||||||
<Show when=move || stats.get().up_limit.unwrap_or(0) > 0 fallback=|| ()>
|
<Show when=move || (stats.get().up_limit.unwrap_or(0) > 0) fallback=|| ()>
|
||||||
<span class="text-[10px] opacity-60">
|
<span class="text-[10px] opacity-60">
|
||||||
{move || format!("(Limit: {})", format_speed(stats.get().up_limit.unwrap_or(0)))}
|
{move || format!("(Limit: {})", format_speed(stats.get().up_limit.unwrap_or(0)))}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ pub fn provide_torrent_store() {
|
|||||||
t.error_message = error_message;
|
t.error_message = error_message;
|
||||||
}
|
}
|
||||||
if let Some(label) = update.label {
|
if let Some(label) = update.label {
|
||||||
t.label = label;
|
t.label = Some(label);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user