From ea4bd1e4c2b03e1f8ccc0cfae88da3ee91ec191b Mon Sep 17 00:00:00 2001 From: alemi Date: Sat, 28 Dec 2024 20:18:49 +0100 Subject: [PATCH] fix(web): no controls in quoted post --- web/src/objects/item.rs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/web/src/objects/item.rs b/web/src/objects/item.rs index 6b2155c..3836125 100644 --- a/web/src/objects/item.rs +++ b/web/src/objects/item.rs @@ -6,7 +6,7 @@ use crate::{prelude::*, URL_SENSITIVE}; use apb::{ActivityMut, Base, Collection, CollectionMut, Object, ObjectMut, Shortcuts}; #[component] -pub fn Object(object: crate::Object) -> impl IntoView { +pub fn Object(object: crate::Object, #[prop(default = true)] controls: bool) -> impl IntoView { let oid = object.id().unwrap_or_default().to_string(); let author_id = object.attributed_to().id().ok().unwrap_or_default(); let author = cache::OBJECTS.get_or(&author_id, serde_json::Value::String(author_id.clone()).into()); @@ -56,7 +56,7 @@ pub fn Object(object: crate::Object) -> impl IntoView { .and_then(|x| { Some(view! {
- + }) }); @@ -211,11 +211,15 @@ pub fn Object(object: crate::Object) -> impl IntoView { {quote_badge} {tag_badges} {audience_badge} - - - - {if privacy.is_public() { Some(view! { }) } else { None }} - + {if controls { + Some(view! { + + + + {if privacy.is_public() { Some(view! { }) } else { None }} + + }) + } else { None }} } }