diff --git a/web/index.html b/web/index.html index 97418f42..d20e0044 100644 --- a/web/index.html +++ b/web/index.html @@ -152,6 +152,11 @@ img.inline-avatar { max-height: 2em; } + img.attachment { + max-height: 15em; + border: 5px solid #bf616a; + padding: 5px; + } div.tl-header { background-color: #bf616a55; color: #bf616a; diff --git a/web/src/components/mod.rs b/web/src/components/mod.rs index cfe95081..0c906f0a 100644 --- a/web/src/components/mod.rs +++ b/web/src/components/mod.rs @@ -2,13 +2,13 @@ mod activity; pub use activity::ActivityLine; mod object; -pub use object::{Object, ObjectInline}; +pub use object::Object; mod user; pub use user::ActorBanner; mod timeline; -pub use timeline::{TimelineFeed, Timeline}; +pub use timeline::{TimelineFeed, TimelineReplies, Timeline}; use leptos::*; diff --git a/web/src/components/object.rs b/web/src/components/object.rs index cf275fc2..c46b5a65 100644 --- a/web/src/components/object.rs +++ b/web/src/components/object.rs @@ -6,64 +6,28 @@ use apb::{target::Addressed, Base, Object}; #[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 author_id = object.attributed_to().id().unwrap_or_default(); - let author = CACHE.get_or(&author_id, serde_json::Value::String(author_id.clone())); - view! { -
- "in reply to "{Uri::pretty(&in_reply_to)} - | -|
{summary.clone()} | -|
{
- content.into_iter().map(|x| view! { {x} }).collect_view() - } |
- |
-
- |
-
+ {object.in_reply_to().id().map(|reply| view! {
+ reply
+ })}
|