From b904883e15a22c14f802d32b3d81d7add6103b49 Mon Sep 17 00:00:00 2001 From: alemi Date: Mon, 13 May 2024 17:18:16 +0200 Subject: [PATCH] feat(web): show articles without borders --- web/src/components/object.rs | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/web/src/components/object.rs b/web/src/components/object.rs index 047c5668..4fcb38c1 100644 --- a/web/src/components/object.rs +++ b/web/src/components/object.rs @@ -125,21 +125,32 @@ pub fn Object(object: crate::Object) -> impl IntoView { }; let post = match object.object_type() { - Some(apb::ObjectType::Document(apb::DocumentType::Page)) => view! { + // mastodon, pleroma, misskey + Some(apb::ObjectType::Note) => view! { +
{post_inner}
+ }.into_view(), + // lemmy with Page, peertube with Video + Some(apb::ObjectType::Document(_)) => view! {
{object.name().unwrap_or_default().to_string()}
{post_inner}
- }.into_view(), // lemmy - Some(apb::ObjectType::Document(apb::DocumentType::Video)) => post_inner.into_view(), // peertube? - Some(apb::ObjectType::Note) => view! { -
{post_inner}
}.into_view(), + // wordpress, ... ? + Some(apb::ObjectType::Article) => view! { +
+

{object.name().unwrap_or_default().to_string()}

+
+ {post_inner} +
+ }.into_view(), + // everything else Some(t) => view! {

{t.as_ref().to_string()}

{post_inner} }.into_view(), + // object without type? None => view! { missing object type }.into_view(), }; view! {