diff --git a/web/src/objects/item.rs b/web/src/objects/item.rs index ed27fa6..0186aa9 100644 --- a/web/src/objects/item.rs +++ b/web/src/objects/item.rs @@ -58,23 +58,37 @@ pub fn Object( content = content.replace(&from, &to); } - - let audience_badge = object.audience().id().str() .map(|x| view! { - - + + & - + {Uri::pretty(&x, 30)} }); + let hashtag_badges = object.tag().filter_map(|x| { + if let Ok(apb::LinkType::Hashtag) = apb::Link::link_type(&x) { + let name = apb::Link::name(&x).unwrap_or_default().replace('#', ""); + let href = Uri::web(U::Hashtag, &name); + Some(view! { + + + # + + {name} + + + + }) + } else { + None + } + }).collect_view(); + let post_image = object.image().get().and_then(|x| x.url().id().str()).map(|x| { let (expand, set_expand) = create_signal(false); view! { @@ -140,6 +154,7 @@ pub fn Object( {post}
+ {if !reply { Some(hashtag_badges) } else { None }} {if !reply { audience_badge } else { None }}