diff options
| author | metamuffin <metamuffin@disroot.org> | 2025-11-18 12:08:34 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2025-11-18 12:08:34 +0100 |
| commit | bac47e456085ea153ae6ae1b1e28e41868693c9c (patch) | |
| tree | 062c157d66faa3935c1175433732d30c07d1cd5b /ui/src | |
| parent | f3af9263b0472bcef3207906ce0e4d1d4aa3595b (diff) | |
| download | jellything-bac47e456085ea153ae6ae1b1e28e41868693c9c.tar jellything-bac47e456085ea153ae6ae1b1e28e41868693c9c.tar.bz2 jellything-bac47e456085ea153ae6ae1b1e28e41868693c9c.tar.zst | |
start reworking model
Diffstat (limited to 'ui/src')
| -rw-r--r-- | ui/src/node_page.rs | 8 | ||||
| -rw-r--r-- | ui/src/props.rs | 18 |
2 files changed, 13 insertions, 13 deletions
diff --git a/ui/src/node_page.rs b/ui/src/node_page.rs index 39b66df..1e029ae 100644 --- a/ui/src/node_page.rs +++ b/ui/src/node_page.rs @@ -116,9 +116,9 @@ markup::define! { }} }} } - @if !node.people.is_empty() { + @if !node.credits.is_empty() { h2 { @trs(lang, "node.people") } - @for (group, people) in &node.people { + @for (group, people) in &node.credits { details[open=group==&PeopleGroup::Cast] { summary { h3 { @format!("{}", group) } } ul.children.hlist { @for (i, pe) in people.iter().enumerate() { @@ -149,11 +149,11 @@ markup::define! { }} } } - @if !node.external_ids.is_empty() { + @if !node.identifiers.is_empty() { details { summary { @trs(lang, "node.external_ids") } table { - @for (key, value) in &node.external_ids { tr { + @for (key, value) in &node.identifiers { tr { tr { td { @trs(lang, &format!("eid.{}", key)) } @if let Some(url) = external_id_url(key, value) { diff --git a/ui/src/props.rs b/ui/src/props.rs index fbeddca..64713ea 100644 --- a/ui/src/props.rs +++ b/ui/src/props.rs @@ -8,7 +8,7 @@ use crate::{ locale::{Language, tr, trs}, }; use jellycommon::{ - Node, Rating, Visibility, + Node, RatingType, Visibility, chrono::DateTime, user::{NodeUserData, WatchedState}, }; @@ -38,14 +38,14 @@ markup::define! { // } @for (kind, value) in &node.ratings { @match kind { - Rating::YoutubeLikes => {p.likes{ @format_count(*value as usize) " Likes" }} - 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 if *full => {p{ "Metacritic Score: " @value }} - Rating::Imdb => {p.rating{ "IMDb " @value }} - Rating::Tmdb => {p.rating{ "TMDB " @value }} - Rating::Trakt if *full => {p.rating{ "Trakt " @value }} + RatingType::YoutubeLikes => {p.likes{ @format_count(*value as usize) " Likes" }} + RatingType::YoutubeViews => {p{ @format_count(*value as usize) " Views" }} + RatingType::YoutubeFollowers => {p{ @format_count(*value as usize) " Subscribers" }} + RatingType::RottenTomatoes => {p.rating{ @value " Tomatoes" }} + RatingType::Metacritic if *full => {p{ "Metacritic Score: " @value }} + RatingType::Imdb => {p.rating{ "IMDb " @value }} + RatingType::Tmdb => {p.rating{ "TMDB " @value }} + RatingType::Trakt if *full => {p.rating{ "Trakt " @value }} _ => {} } } |