forked from alemi/upub
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 {
|
div.border {
|
||||||
border: 1px dashed var(--accent);
|
border: 1px dashed var(--accent);
|
||||||
}
|
}
|
||||||
div.border-solid {
|
span.border-button {
|
||||||
border: 1px solid var(--background-dim);
|
border: 1px solid var(--background-dim);
|
||||||
}
|
}
|
||||||
|
span.border-button:hover {
|
||||||
|
background-color: var(--background-dim);
|
||||||
|
}
|
||||||
div.inline {
|
div.inline {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,14 +134,14 @@ pub fn Object(object: crate::Object) -> impl IntoView {
|
||||||
|
|
||||||
let audience_badge = object.audience().id().str()
|
let audience_badge = object.audience().id().str()
|
||||||
.map(|x| view! {
|
.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)}
|
{Uri::pretty(&x)}
|
||||||
</a>
|
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</span>
|
||||||
|
</a>
|
||||||
});
|
});
|
||||||
|
|
||||||
let post_inner = view! {
|
let post_inner = view! {
|
||||||
|
|
|
@ -60,14 +60,17 @@ impl FiltersConfig {
|
||||||
};
|
};
|
||||||
let mut reply_filter = true;
|
let mut reply_filter = true;
|
||||||
|
|
||||||
if
|
if let Ok(obj_id) = item.object().id() {
|
||||||
item.in_reply_to().id().is_ok() ||
|
if let Some(obj) = crate::CACHE.get(obj_id) {
|
||||||
item.object().get().map(|x|
|
if obj.in_reply_to().id().is_ok() {
|
||||||
x.in_reply_to().id().is_ok()
|
|
||||||
).unwrap_or(false)
|
|
||||||
{
|
|
||||||
reply_filter = self.replies;
|
reply_filter = self.replies;
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if item.in_reply_to().id().is_ok() {
|
||||||
|
reply_filter = self.replies;
|
||||||
|
}
|
||||||
|
|
||||||
type_filter && reply_filter
|
type_filter && reply_filter
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue