Lots of fixes for artist detail page and track management

This commit is contained in:
Connor Johnstone
2026-03-18 13:44:49 -04:00
parent 2314346925
commit a268ec4e56
12 changed files with 889 additions and 80 deletions

View File

@@ -1,2 +1,3 @@
pub mod navbar;
pub mod status_badge;
pub mod watch_indicator;

View File

@@ -0,0 +1,25 @@
use yew::prelude::*;
#[derive(Properties, PartialEq)]
pub struct Props {
pub status: String,
}
#[function_component(WatchIndicator)]
pub fn watch_indicator(props: &Props) -> Html {
let (icon, color, title) = match props.status.as_str() {
"owned" => ("", "var(--success)", "Owned"),
"partial" => ("", "var(--warning)", "Partial"),
"wanted" => ("", "var(--accent)", "Wanted"),
"downloading" => ("", "var(--accent)", "Downloading"),
"fully_watched" => ("", "var(--accent)", "Fully watched"),
"unwatched" => ("", "var(--text-muted)", "Not watched"),
_ => ("", "var(--text-muted)", "Unknown"),
};
html! {
<span style={format!("color: {color}; font-size: 1.1em; cursor: help;")} title={title}>
{ icon }
</span>
}
}