app

Local-first trade for farms and co-ops
git clone https://radroots.dev/git/app.git
Log | Files | Refs | README | LICENSE

commit 4968368f7bc2c62732ad2271a074da01d75e7874
parent 60bb97007bd162317efb20af67d7c63b9f003d11
Author: triesap <tyson@radroots.org>
Date:   Fri,  6 Feb 2026 19:32:13 +0000

ui: fix ios switch motion

- use class toggle for checked switch state
- apply checked styles via ios-switch--checked class
- keep switch thumb translation in css
- retain existing switch sizing and colors

Diffstat:
Mapp/src/app.rs | 4++--
Mapp/stylesheets/apps-ui.css | 4++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/src/app.rs b/app/src/app.rs @@ -2057,7 +2057,7 @@ fn ConfigPage() -> impl IntoView { <span>{"Order updates"}</span> <span class="ios-switch" - attr:data-checked=move || if notifications_orders.get() { "true" } else { "false" } + class:ios-switch--checked=move || notifications_orders.get() > <span class="ios-switch__thumb"></span> </span> @@ -2075,7 +2075,7 @@ fn ConfigPage() -> impl IntoView { <span>{"Messages"}</span> <span class="ios-switch" - attr:data-checked=move || if notifications_messages.get() { "true" } else { "false" } + class:ios-switch--checked=move || notifications_messages.get() > <span class="ios-switch__thumb"></span> </span> diff --git a/app/stylesheets/apps-ui.css b/app/stylesheets/apps-ui.css @@ -162,12 +162,12 @@ transform: translateX(0); } - .ios-switch[data-checked="true"] { + .ios-switch--checked { background: #34c759; border-color: #34c759; } - .ios-switch[data-checked="true"] .ios-switch__thumb { + .ios-switch--checked .ios-switch__thumb { transform: translateX(18px); background: #fff; }