Fixed the bug that would cause the wifi name to not hide despite the option being selected.

This commit is contained in:
Jas Singh
2024-07-25 01:39:16 -07:00
parent aedb112a5c
commit b289c0b271

View File

@@ -10,9 +10,15 @@ const Network = () => {
}), }),
Widget.Label({ Widget.Label({
class_name: "bar-network-label", class_name: "bar-network-label",
label: network.wifi label: Utils.merge(
.bind("ssid") [network.bind("wifi"), options.bar.network.label.bind("value")],
.as((ssid) => (ssid ? ` ${ssid}` : " --").substring(0, 7)), (wifi, showLabel) => {
if (showLabel) {
return wifi.ssid ? wifi.ssid.substring(0, 7) : " --";
}
return "";
},
),
}), }),
]; ];