commit 0af4f0b1be152fcbe65e0b990da53cd5a8d04da9 parent 69b666b2cedcf612ebe8b45e56e1bdbafedd1ef3 Author: triesap <tyson@radroots.org> Date: Fri, 6 Feb 2026 19:08:22 +0000 app: fix notification toggles - make notification rows clickable switch controls - keep ios switch visuals inside tappable rows - retain switch aria attributes for accessibility - simplify toggle markup for consistent clicks Diffstat:
| M | app/src/app.rs | | | 44 | ++++++++++++++++++++++---------------------- |
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/app/src/app.rs b/app/src/app.rs @@ -2044,42 +2044,42 @@ fn ConfigPage() -> impl IntoView { id="app-config-preferences-notifications".to_string() > <div class="flex flex-col rounded-touch border border-ly1-edge/60 bg-ly1 overflow-hidden"> - <div + <button id="app-config-notifications-orders" - class="flex items-center justify-between gap-4 px-4 py-3 text-sm text-ly1-gl" + type="button" + class="flex w-full items-center justify-between gap-4 px-4 py-3 text-left text-sm text-ly1-gl" + role="switch" + aria-checked=move || if notifications_orders.get() { "true" } else { "false" } + on:click=move |_| { + notifications_orders.update(|value| *value = !*value); + } > <span>{"Order updates"}</span> - <button - type="button" + <span class="ios-switch" - role="switch" - aria-checked=move || if notifications_orders.get() { "true" } else { "false" } attr:data-checked=move || if notifications_orders.get() { "true" } else { "false" } - on:click=move |_| { - notifications_orders.update(|value| *value = !*value); - } > <span class="ios-switch__thumb"></span> - </button> - </div> - <div + </span> + </button> + <button id="app-config-notifications-messages" - class="flex items-center justify-between gap-4 border-t border-ly1-edge/50 px-4 py-3 text-sm text-ly1-gl" + type="button" + class="flex w-full items-center justify-between gap-4 border-t border-ly1-edge/50 px-4 py-3 text-left text-sm text-ly1-gl" + role="switch" + aria-checked=move || if notifications_messages.get() { "true" } else { "false" } + on:click=move |_| { + notifications_messages.update(|value| *value = !*value); + } > <span>{"Messages"}</span> - <button - type="button" + <span class="ios-switch" - role="switch" - aria-checked=move || if notifications_messages.get() { "true" } else { "false" } attr:data-checked=move || if notifications_messages.get() { "true" } else { "false" } - on:click=move |_| { - notifications_messages.update(|value| *value = !*value); - } > <span class="ios-switch__thumb"></span> - </button> - </div> + </span> + </button> </div> </RadrootsAppUiFormField> </section>