diff --git a/web/src/components/object.rs b/web/src/components/object.rs index b1a7c210..ad6c9c44 100644 --- a/web/src/components/object.rs +++ b/web/src/components/object.rs @@ -1,5 +1,5 @@ use leptos::*; -use crate::prelude::*; +use crate::{prelude::*, URL_SENSITIVE}; use apb::{target::Addressed, Base, Object}; @@ -10,15 +10,21 @@ pub fn Object(object: serde_json::Value) -> impl IntoView { let content = dissolve::strip_html_tags(object.content().unwrap_or_default()); let author_id = object.attributed_to().id().unwrap_or_default(); let author = CACHE.get_or(&author_id, serde_json::Value::String(author_id.clone())); + let sensitive = object.sensitive().unwrap_or_default(); let attachments = object.attachment() .map(|x| { let (expand, set_expand) = create_signal(false); + let href = x.url().id().unwrap_or_default(); view! {
@@ -48,7 +54,7 @@ pub fn Object(object: serde_json::Value) -> impl IntoView {
-+ {content.into_iter().map(|x| view! { {x}
}).collect_view()} {attachments_padding} {attachments} @@ -58,11 +64,11 @@ pub fn Object(object: serde_json::Value) -> impl IntoView { } #[component] -pub fn Summary(summary: Option, children: Children) -> impl IntoView { +pub fn Summary(summary: Option , open: bool, children: Children) -> impl IntoView { match summary.filter(|x| !x.is_empty()) { None => children().into_view(), Some(summary) => view! { - +diff --git a/web/src/control.rs b/web/src/control.rs index 128265a7..9602e2ee 100644 --- a/web/src/control.rs +++ b/web/src/control.rs @@ -95,6 +95,7 @@ pub fn AdvancedPostBox(username: Signal
{summary}