aboutsummaryrefslogtreecommitdiff
path: root/ui/src/components/node_card.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2026-02-27 14:40:15 +0100
committermetamuffin <metamuffin@disroot.org>2026-02-27 14:40:15 +0100
commitc05bfcc2775f0e11db6e856bfcf06d0419c35d54 (patch)
treeffd0e9fcf6b476a6198287085a514cfa7940c200 /ui/src/components/node_card.rs
parent4ba86694e393c61107e27c4127efc0455b329524 (diff)
downloadjellything-c05bfcc2775f0e11db6e856bfcf06d0419c35d54.tar
jellything-c05bfcc2775f0e11db6e856bfcf06d0419c35d54.tar.bz2
jellything-c05bfcc2775f0e11db6e856bfcf06d0419c35d54.tar.zst
ui changed before object slices
Diffstat (limited to 'ui/src/components/node_card.rs')
-rw-r--r--ui/src/components/node_card.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/ui/src/components/node_card.rs b/ui/src/components/node_card.rs
index d93825b..e1baec1 100644
--- a/ui/src/components/node_card.rs
+++ b/ui/src/components/node_card.rs
@@ -15,8 +15,8 @@ use jellycommon::{
};
markup::define! {
- NodeCard<'a>(ri: &'a RenderInfo<'a>, nku: Object<'a>) {
- @let node = nku.get(NKU_NODE).unwrap_or_default();
+ NodeCard<'a>(ri: &'a RenderInfo<'a>, nku: &'a Nku<'a>) {
+ @let node = nku.node;
@let slug = node.get(NO_SLUG).unwrap_or_default();
div[class=&format!("card {}", aspect_class(node))] {
.poster {
@@ -27,7 +27,7 @@ markup::define! {
@if node.has(NO_TRACK.0) {
a.play.icon[href=u_node_slug_player(&slug)] { "play_arrow" }
}
- @Props { ri, nku: *nku, full: false }
+ @Props { ri, nku, full: false }
}
}
div.title {
@@ -37,14 +37,14 @@ markup::define! {
}
div.subtitle {
span {
- @nku.get(NKU_ROLE).or(node.get(NO_SUBTITLE))
+ @nku.role.or(node.get(NO_SUBTITLE))
}
}
}
}
- NodeCardWide<'a>(ri: &'a RenderInfo<'a>, nku: Object<'a>) {
- @let node = nku.get(NKU_NODE).unwrap_or_default();
+ NodeCardWide<'a>(ri: &'a RenderInfo<'a>, nku: Nku<'a>) {
+ @let node = nku.node;
@let slug = node.get(NO_SLUG).unwrap_or_default();
div[class="card wide"] {
div[class=&format!("poster {}", aspect_class(node))] {
@@ -59,14 +59,14 @@ markup::define! {
}
div.details {
a.title[href=u_node_slug(&slug)] { @node.get(NO_TITLE) }
- @Props { ri, nku: *nku ,full: false }
+ @Props { ri, nku ,full: false }
span.overview { @node.get(NO_DESCRIPTION) }
}
}
}
- NodeCardHightlight<'a>(ri: &'a RenderInfo<'a>, nku: Object<'a>) {
- @let node = nku.get(NKU_NODE).unwrap_or_default();
+ NodeCardHightlight<'a>(ri: &'a RenderInfo<'a>, nku: &'a Nku<'a>) {
+ @let node = nku.node;
@let slug = node.get(NO_SLUG).unwrap_or_default();
@let backdrop = u_image(node.get(NO_PICTURES).unwrap_or_default().get(PICT_BACKDROP).unwrap_or_default(), 2048);
div[class="card highlight", style=format!("background-image: url(\"{backdrop}\")")] {