Touch up network menu and finish bluetooth menu rework.
This commit is contained in:
@@ -11,54 +11,52 @@ const Ethernet = () => {
|
||||
child: Widget.Label({
|
||||
class_name: "menu-label",
|
||||
hexpand: true,
|
||||
hpack: "center",
|
||||
hpack: "start",
|
||||
label: "Ethernet",
|
||||
}),
|
||||
}),
|
||||
Widget.Box({
|
||||
class_name: "menu-items-section",
|
||||
vertical: true,
|
||||
children: [
|
||||
Widget.Box({
|
||||
class_name: "menu-content",
|
||||
vertical: true,
|
||||
child: network.bind("wired").as((wired) => {
|
||||
return Widget.Box({
|
||||
class_name: "network-element-item",
|
||||
child: Widget.Box({
|
||||
hpack: "start",
|
||||
children: [
|
||||
Widget.Icon({
|
||||
class_name: `network-icon ethernet ${network.wired.state === "activated" ? "active" : ""}`,
|
||||
tooltip_text: wired.internet,
|
||||
icon: `${wired["icon_name"]}`,
|
||||
}),
|
||||
Widget.Box({
|
||||
class_name: "connection-container",
|
||||
vertical: true,
|
||||
children: [
|
||||
Widget.Label({
|
||||
class_name: "active-connection",
|
||||
hpack: "start",
|
||||
truncate: "end",
|
||||
wrap: true,
|
||||
label: `Ethernet Connection ${typeof wired.speed === "number" ? `(${wired.speed / 1000} Gbps)` : ""}`,
|
||||
}),
|
||||
Widget.Label({
|
||||
hpack: "start",
|
||||
class_name: "connection-status dim",
|
||||
label:
|
||||
wired.internet.charAt(0).toUpperCase() +
|
||||
wired.internet.slice(1),
|
||||
}),
|
||||
],
|
||||
}),
|
||||
],
|
||||
}),
|
||||
});
|
||||
}),
|
||||
child: Widget.Box({
|
||||
class_name: "menu-content",
|
||||
vertical: true,
|
||||
child: network.bind("wired").as((wired) => {
|
||||
return Widget.Box({
|
||||
class_name: "network-element-item",
|
||||
child: Widget.Box({
|
||||
hpack: "start",
|
||||
children: [
|
||||
Widget.Icon({
|
||||
class_name: `network-icon ethernet ${network.wired.state === "activated" ? "active" : ""}`,
|
||||
tooltip_text: wired.internet,
|
||||
icon: `${wired["icon_name"]}`,
|
||||
}),
|
||||
Widget.Box({
|
||||
class_name: "connection-container",
|
||||
vertical: true,
|
||||
children: [
|
||||
Widget.Label({
|
||||
class_name: "active-connection",
|
||||
hpack: "start",
|
||||
truncate: "end",
|
||||
wrap: true,
|
||||
label: `Ethernet Connection ${typeof wired.speed === "number" ? `(${wired.speed / 1000} Gbps)` : ""}`,
|
||||
}),
|
||||
Widget.Label({
|
||||
hpack: "start",
|
||||
class_name: "connection-status dim",
|
||||
label:
|
||||
wired.internet.charAt(0).toUpperCase() +
|
||||
wired.internet.slice(1),
|
||||
}),
|
||||
],
|
||||
}),
|
||||
],
|
||||
}),
|
||||
});
|
||||
}),
|
||||
],
|
||||
}),
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const renderWapStaging = (self, network, staging, connecting) => {
|
||||
Utils.merge([network.bind("wifi"), staging.bind("value")], () => {
|
||||
console.log(JSON.stringify(network, null, 2));
|
||||
if (!Object.keys(staging.value).length) {
|
||||
return (self.child = Widget.Box());
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ const Wifi = () => {
|
||||
child: Widget.Label({
|
||||
class_name: "menu-label",
|
||||
hexpand: true,
|
||||
hpack: "center",
|
||||
hpack: "start",
|
||||
label: "Wi-Fi",
|
||||
}),
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user