diff --git a/web/src/view.rs b/web/src/view.rs index 2e5d590e..26274ad7 100644 --- a/web/src/view.rs +++ b/web/src/view.rs @@ -92,6 +92,8 @@ pub fn ActorBanner( #[component] pub fn Object(object: serde_json::Value) -> impl IntoView { + let oid = object.id().unwrap_or_default().to_string(); + let in_reply_to = object.in_reply_to().id().unwrap_or_default(); let summary = object.summary().unwrap_or_default().to_string(); let content = dissolve::strip_html_tags(object.content().unwrap_or_default()); let date = object.published(); @@ -100,15 +102,22 @@ pub fn Object(object: serde_json::Value) -> impl IntoView { view! {
+ {move || if !in_reply_to.is_empty() { + Some(view! { + + + + }) + } else { None }} {move || if !summary.is_empty() { - view! { + Some(view! { - }.into_view() - } else { - view! { }.into_view() - }} + }) + } else { None }} - +
+ "in reply to "{Uri::pretty(&in_reply_to)} +
{summary.clone()}
{ content.into_iter().map(|x| view! {

{x}

}).collect_view() @@ -116,7 +125,11 @@ pub fn Object(object: serde_json::Value) -> impl IntoView {
+ + + +