feat(web): allow hiding deletes (default on)

This commit is contained in:
əlemi 2024-07-03 06:02:39 +02:00
parent 09325c91de
commit 9c47a15ca6
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 6 additions and 1 deletions

View file

@ -33,6 +33,9 @@ pub struct FiltersConfig {
#[serde_inline_default(true)]
pub announces: bool,
#[serde_inline_default(false)]
pub deletes: bool,
#[serde_inline_default(true)]
pub follows: bool,
@ -54,6 +57,7 @@ impl FiltersConfig {
apb::ObjectType::Activity(apb::ActivityType::Create) => self.creates,
apb::ObjectType::Activity(apb::ActivityType::Announce) => self.announces,
apb::ObjectType::Activity(apb::ActivityType::Update) => self.updates,
apb::ObjectType::Activity(apb::ActivityType::Delete) => self.deletes,
apb::ObjectType::Activity(
apb::ActivityType::Follow | apb::ActivityType::Accept(_) | apb::ActivityType::Reject(_)
) => self.follows,

View file

@ -101,9 +101,10 @@ pub fn ConfigPage(setter: WriteSignal<crate::Config>) -> impl IntoView {
<li><span title="like activities"><input type="checkbox" prop:checked=get_cfg!(filter likes) on:input=set_cfg!(filter likes) />" likes"</span></li>
<li><span title="create activities with object"><input type="checkbox" prop:checked=get_cfg!(filter creates) on:input=set_cfg!(filter creates)/>" creates"</span></li>
<li><span title="update activities, to objects or actors"><input type="checkbox" prop:checked=get_cfg!(filter updates) on:input=set_cfg!(filter updates)/>" updates"</span></li>
<li><span title="delete activities"><input type="checkbox" prop:checked=get_cfg!(filter deletes) on:input=set_cfg!(filter deletes)/>" deletes"</span></li>
<li><span title="announce activities with object"><input type="checkbox" prop:checked=get_cfg!(filter announces) on:input=set_cfg!(filter announces) />" announces"</span></li>
<li><span title="follow, accept and reject activities"><input type="checkbox" prop:checked=get_cfg!(filter follows) on:input=set_cfg!(filter follows) />" follows"</span></li>
<li><span title="objects without a related activity to display"><input type="checkbox" prop:checked=get_cfg!(filter orphans) on:input=set_cfg!(filter orphans) />" orphans"</span></li>
<li><span title="objects without a related activity to display"><input type="checkbox" prop:checked=get_cfg!(filter orphans) on:input=set_cfg!(filter orphans) />" fetched"</span></li>
</ul>
<hr />
<div class="border ma-2 pa-1">