From 6907560aaaa376b15044e0d2537006d2fbf969a2 Mon Sep 17 00:00:00 2001 From: alemi Date: Wed, 3 Jul 2024 04:59:28 +0200 Subject: [PATCH] fix(web): nicer lemmy posts --- web/src/components/object.rs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/web/src/components/object.rs b/web/src/components/object.rs index 5bd9b724..d65fa971 100644 --- a/web/src/components/object.rs +++ b/web/src/components/object.rs @@ -78,11 +78,13 @@ pub fn Attachment( "link" => view! { - - - {Uri::pretty(&href)} - - + {object.name().map(|name| { view! {

{name.to_string()}

@@ -161,10 +163,10 @@ pub fn Object(object: crate::Object) -> impl IntoView { }.into_view(), // lemmy with Page, peertube with Video Ok(apb::ObjectType::Document(t)) => view! { -
-
+
+

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

+ {post_inner}
}.into_view(),