aboutsummaryrefslogtreecommitdiff
path: root/server/src/routes/ui/node.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/routes/ui/node.rs')
-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 {