diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-03-26 20:36:32 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-03-26 20:36:32 +1100 |
| commit | 0ab689ab9839d5a3be7e238eb095768b68af85e7 (patch) | |
| tree | 3ecad5402a4d012b8f941e5940a6c8552f01b002 | |
| parent | sidebar: fix widget destroyed error (diff) | |
| download | caelestia-shell-0ab689ab9839d5a3be7e238eb095768b68af85e7.tar.gz caelestia-shell-0ab689ab9839d5a3be7e238eb095768b68af85e7.tar.bz2 caelestia-shell-0ab689ab9839d5a3be7e238eb095768b68af85e7.zip | |
sidebar: handle no wifi card
| -rw-r--r-- | src/modules/sidebar/modules/networks.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/sidebar/modules/networks.tsx b/src/modules/sidebar/modules/networks.tsx index a28a8fc..7186f35 100644 --- a/src/modules/sidebar/modules/networks.tsx +++ b/src/modules/sidebar/modules/networks.tsx @@ -119,9 +119,10 @@ export default () => { <label label={bind(label)} /> <box hexpand /> <button - className={bind(network.wifi, "scanning").as(s => (s ? "enabled" : ""))} + sensitive={network.get_wifi() ? bind(network.wifi, "scanning").as(e => !e) : false} + className={network.get_wifi() ? bind(network.wifi, "scanning").as(s => (s ? "enabled" : "")) : ""} cursor="pointer" - onClicked={() => network.wifi.scan()} + onClicked={() => network.get_wifi()?.scan()} label=" Scan" /> </box> |