Major early updates

This commit is contained in:
Connor Johnstone
2026-03-18 10:56:19 -04:00
parent 50a0ddcdbc
commit 55607df07b
20 changed files with 2665 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
use yew::prelude::*;
#[derive(Properties, PartialEq)]
pub struct Props {
pub status: String,
}
#[function_component(StatusBadge)]
pub fn status_badge(props: &Props) -> Html {
let class = match props.status.to_lowercase().as_str() {
"wanted" => "badge badge-wanted",
"available" => "badge badge-available",
"downloaded" => "badge badge-downloaded",
"owned" => "badge badge-owned",
"pending" => "badge badge-pending",
"failed" => "badge badge-failed",
"completed" => "badge badge-completed",
"downloading" => "badge badge-available",
"cancelled" => "badge badge-pending",
_ => "badge",
};
html! {
<span class={class}>{ &props.status }</span>
}
}