Fix network list flickering on refresh

This commit is contained in:
Jas Singh
2024-06-29 18:43:59 -07:00
parent da5d297b60
commit 47b3f1c74e
9 changed files with 29 additions and 495 deletions

View File

@@ -0,0 +1,46 @@
const network = await Service.import("network");
import { renderWAPs } from "./WirelessAPs.js";
import { renderWapStaging } from "./APStaging.js";
const Staging = Variable({});
const Connecting = Variable("");
const Wifi = () => {
return Widget.Box({
class_name: "menu-section-container wifi",
vertical: true,
children: [
Widget.Box({
class_name: "menu-label-container",
hpack: "fill",
child: Widget.Label({
class_name: "menu-label",
hexpand: true,
hpack: "center",
label: "Wi-Fi",
}),
}),
Widget.Box({
class_name: "menu-items-section",
vertical: true,
children: [
Widget.Box({
class_name: "wap-staging",
setup: (self) => {
renderWapStaging(self, network, Staging, Connecting);
},
}),
Widget.Box({
class_name: "available-waps",
vertical: true,
setup: (self) => {
renderWAPs(self, network, Staging, Connecting);
},
}),
],
}),
],
});
};
export { Wifi };