diff options
Diffstat (limited to 'server/src/routes/ui/home.rs')
-rw-r--r-- | server/src/routes/ui/home.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server/src/routes/ui/home.rs b/server/src/routes/ui/home.rs index ed9f7c1..6a3b9a4 100644 --- a/server/src/routes/ui/home.rs +++ b/server/src/routes/ui/home.rs @@ -73,6 +73,12 @@ pub fn r_home(sess: Session, db: &State<Database>) -> MyResult<DynLayoutPage> { .filter(|(_, _, u)| matches!(u.watched, WatchedState::Progress(_))) .map(|k| k.to_owned()) .collect::<Vec<_>>(); + + let watchlist = items + .iter() + .filter(|(_, _, u)| matches!(u.watched, WatchedState::Pending)) + .map(|k| k.to_owned()) + .collect::<Vec<_>>(); Ok(LayoutPage { title: "Home".to_string(), @@ -87,6 +93,12 @@ pub fn r_home(sess: Session, db: &State<Database>) -> MyResult<DynLayoutPage> { li { @NodeCard { id, node, udata } } }}} } + @if !watchlist.is_empty() { + h2 { "Watchlist" } + .homelist { ul {@for (id, node, udata) in &watchlist { + li { @NodeCard { id, node, udata } } + }}} + } h2 { "Latest Releases" } .homelist { ul {@for (id, node, udata) in &latest { li { @NodeCard { id, node, udata } } |