feat: add wifi toggle slider (#348)

* feat: add wifi toggle slider

* Added styling options for the network switch

---------

Co-authored-by: Jas Singh <jaskiratpal.singh@outlook.com>
This commit is contained in:
Rubin Bhandari
2024-10-21 14:15:53 +05:45
committed by GitHub
parent 3cae0e1fae
commit 2126cf0657
4 changed files with 181 additions and 117 deletions

View File

@@ -31,6 +31,15 @@ const Wifi = (): BoxWidget => {
hpack: 'start',
label: 'Wi-Fi',
}),
Widget.Switch({
class_name: 'menu-switch network',
vpack: 'center',
tooltip_text: 'Toggle Wifi',
active: network.wifi.enabled,
on_activate: () => {
network.toggleWifi();
},
}),
Widget.Button({
vpack: 'center',
hpack: 'end',