sidebar: handle no wifi card

This commit is contained in:
2 * r + 2 * t 2025-03-26 20:36:32 +11:00
parent 28f94ec6a0
commit 0ab689ab98

View file

@ -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>