aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-01-23 02:38:52 +0100
committermetamuffin <metamuffin@disroot.org>2024-01-23 02:38:52 +0100
commit63661f7cf6ed7421b895e024d47664464fc461b1 (patch)
tree883ba5069ede31649388081257f096de78a4ceb8
parentcd9a7f2f80465044fdafd992b574a3c951a68cbf (diff)
downloadjellything-63661f7cf6ed7421b895e024d47664464fc461b1.tar
jellything-63661f7cf6ed7421b895e024d47664464fc461b1.tar.bz2
jellything-63661f7cf6ed7421b895e024d47664464fc461b1.tar.zst
less props in cards
-rw-r--r--server/src/routes/ui/node.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/server/src/routes/ui/node.rs b/server/src/routes/ui/node.rs
index 74dba8a..c9adfb6 100644
--- a/server/src/routes/ui/node.rs
+++ b/server/src/routes/ui/node.rs
@@ -108,7 +108,7 @@ markup::define! {
@if !(matches!(node.kind.unwrap_or_default(), NodeKind::Collection | NodeKind::Channel)) {
a.play.icon[href=&uri!(r_player(id, PlayerConfig::default()))] { "play_arrow" }
}
- @Props { node, udata }
+ @Props { node, udata, full: false }
}
}
div.title {
@@ -153,7 +153,7 @@ markup::define! {
}
}
.details {
- @Props { node, udata }
+ @Props { node, udata, full: true }
h3 { @node.tagline }
@if let Some(description) = &node.description {
p { @for line in description.lines() { @line br; } }
@@ -227,7 +227,7 @@ markup::define! {
}
}
- Props<'a>(node: &'a NodePublic, udata: &'a NodeUserData) {
+ Props<'a>(node: &'a NodePublic, udata: &'a NodeUserData, full: bool) {
.props {
@if let Some(m) = &node.media {
p { @format_duration(m.duration) }
@@ -245,10 +245,11 @@ markup::define! {
Rating::YoutubeViews => {p{ @format_count(*value as usize) " Views" }}
Rating::YoutubeFollowers => {p{ @format_count(*value as usize) " Subscribers" }}
Rating::RottenTomatoes => {p.rating{ @value " Tomatoes" }}
- Rating::Metacritic => {p{ "Metacritic Score: " @value }}
+ Rating::Metacritic if *full => {p{ "Metacritic Score: " @value }}
Rating::Imdb => {p.rating{ "IMDb " @value }}
Rating::Tmdb => {p.rating{ "TMDB " @value }}
- Rating::Trakt => {p.rating{ "Trakt " @value }}
+ Rating::Trakt if *full => {p.rating{ "Trakt " @value }}
+ _ => {}
}
}
@if let Some(f) = &node.federated {