From b9f512a988cebe38fba16b64f53733c8b00740c0 Mon Sep 17 00:00:00 2001 From: alemi Date: Sun, 12 May 2024 00:52:27 +0200 Subject: [PATCH] fix(web): better view for lemmy objects --- web/index.html | 4 ++++ web/src/components/object.rs | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/web/index.html b/web/index.html index a22e11e4..6fd3ee95 100644 --- a/web/index.html +++ b/web/index.html @@ -112,6 +112,10 @@ position: sticky; background-color: var(--background); } + div.border { + padding: 1em; + border: 1px dashed var(--accent); + } @media screen and (max-width: 786px) { div.sticky { top: 1.75rem; diff --git a/web/src/components/object.rs b/web/src/components/object.rs index da2a7b0b..f19449b0 100644 --- a/web/src/components/object.rs +++ b/web/src/components/object.rs @@ -115,7 +115,11 @@ pub fn Object(object: crate::Object) -> impl IntoView { }; let post = match object.object_type() { Some(apb::ObjectType::Document(apb::DocumentType::Page)) => view! { - {post_inner}
+
+ {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! {