fix(web): pretty uris to go to replies and actors

This commit is contained in:
əlemi 2024-04-18 05:30:46 +02:00
parent f4252a2fbf
commit 4e75ed3dbc
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -61,7 +61,7 @@ pub fn ActorBanner(
) -> impl IntoView { ) -> impl IntoView {
match object { match object {
serde_json::Value::String(id) => view! { serde_json::Value::String(id) => view! {
<div><b>{id}</b></div> <div><b>?</b>" "<a class="clean hover" href={Uri::web("users", &id)}>{Uri::pretty(&id)}</a></div>
}, },
serde_json::Value::Object(_) => { serde_json::Value::Object(_) => {
let uid = object.id().unwrap_or_default().to_string(); let uid = object.id().unwrap_or_default().to_string();
@ -106,7 +106,7 @@ pub fn Object(object: serde_json::Value) -> impl IntoView {
Some(view! { Some(view! {
<tr class="post-table" > <tr class="post-table" >
<td class="post-table pa-1" colspan="2" > <td class="post-table pa-1" colspan="2" >
"in reply to "<small><a class="clean hover" href={in_reply_to.clone()} target="_blank">{Uri::pretty(&in_reply_to)}</a></small> "in reply to "<small><a class="clean hover" href={Uri::web("objects", &in_reply_to)}>{Uri::pretty(&in_reply_to)}</a></small>
</td> </td>
</tr> </tr>
}) })