feat(web): better tags, fix reply filtering
This commit is contained in:
parent
be46c5ed7c
commit
afa5bd45d0
3 changed files with 22 additions and 16 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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">
|
||||
<span class="border-button">
|
||||
<code class="color">&</code>
|
||||
<small>
|
||||
{Uri::pretty(&x)}
|
||||
</a>
|
||||
</small>
|
||||
</div>
|
||||
</span>
|
||||
</a>
|
||||
});
|
||||
|
||||
let post_inner = view! {
|
||||
|
|
|
@ -60,14 +60,17 @@ 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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue