Make unsaved Nearby networks clickable, add password-entry dialog
Some checks failed
Mirror to GitHub / mirror (push) Successful in 1m14s
Build and publish package / package (push) Failing after 33s
release / build (push) Successful in 1m24s

Rows for scanned networks not yet in breadcrumbs' saved config were
both dimmed and disabled (set_sensitive(false)), so there was no way
to add them from the popover. They now stay visually dimmed via the
existing wifi-popover-row-unsaved style but remain clickable, opening
a small password dialog that saves + joins the network via
`breadcrumbs add` + `breadcrumbs join`.
This commit is contained in:
Breadway 2026-07-10 13:37:56 +08:00
parent e057f97e82
commit 8471cc02fe
5 changed files with 98 additions and 9 deletions

View file

@ -142,3 +142,19 @@ pub fn spawn_join(ssid: String) {
});
}
/// Fire-and-forget: save a new network with its password, then join it.
pub fn spawn_add_and_join(ssid: String, password: String) {
relm4::spawn(async move {
let added = tokio::process::Command::new("breadcrumbs")
.args(["add", &ssid, &password])
.output()
.await;
if matches!(added, Ok(o) if o.status.success()) {
let _ = tokio::process::Command::new("breadcrumbs")
.args(["join", &ssid])
.output()
.await;
}
});
}