use leptos::*; use crate::prelude::*; #[component] pub fn ConfigPage(setter: WriteSignal) -> impl IntoView { let config = use_context::>().expect("missing config context"); macro_rules! get_cfg { (filter $field:ident) => { move || config.get().filters.$field }; ($field:ident) => { move || config.get().$field }; } macro_rules! set_cfg { ($field:ident) => { move |ev| { let mut mock = config.get(); mock.$field = event_target_checked(&ev); setter.set(mock); } }; (filter $field:ident) => { move |ev| { let mut mock = config.get(); mock.filters.$field = event_target_checked(&ev); setter.set(mock); } }; } view! {
config

config is saved in your browser local storage

loop videos

collapse content warnings


filters

  • " likes"
  • " creates"
  • " announces"
  • " follows"
  • " orphans"

devtools

} }