fix(frontend): fix statusbar type errors and store logic

This commit is contained in:
spinline
2026-02-03 23:36:05 +03:00
parent 563ffad3ab
commit f3c49fb2cf
2 changed files with 3 additions and 3 deletions

View File

@@ -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>

View File

@@ -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);
} }
} }
}); });