feat(web): better tags, fix reply filtering

This commit is contained in:
əlemi 2024-06-07 05:47:51 +02:00
parent be46c5ed7c
commit afa5bd45d0
Signed by: alemi
GPG key ID: A4895B84D311642C
3 changed files with 22 additions and 16 deletions

View file

@ -120,9 +120,12 @@
div.border {
border: 1px dashed var(--accent);
}
div.border-solid {
span.border-button {
border: 1px solid var(--background-dim);
}
span.border-button:hover {
background-color: var(--background-dim);
}
div.inline {
display: inline;
}

View file

@ -134,14 +134,14 @@ pub fn Object(object: crate::Object) -> impl IntoView {
let audience_badge = object.audience().id().str()
.map(|x| view! {
<div class="inline border-solid">
<code class="color">~</code>
<small>
<a class="clean dim" href={x.clone()} target="_blank" rel="nofollow noreferrer">
<a class="clean dim" href={x.clone()} target="_blank" rel="nofollow noreferrer">
<span class="border-button">
<code class="color">&</code>
<small>
{Uri::pretty(&x)}
</a>
</small>
</div>
</small>
</span>
</a>
});
let post_inner = view! {

View file

@ -60,15 +60,18 @@ impl FiltersConfig {
};
let mut reply_filter = true;
if
item.in_reply_to().id().is_ok() ||
item.object().get().map(|x|
x.in_reply_to().id().is_ok()
).unwrap_or(false)
{
if let Ok(obj_id) = item.object().id() {
if let Some(obj) = crate::CACHE.get(obj_id) {
if obj.in_reply_to().id().is_ok() {
reply_filter = self.replies;
}
}
}
if item.in_reply_to().id().is_ok() {
reply_filter = self.replies;
};
}
type_filter && reply_filter
}
}