extract constants
This commit is contained in:
parent
bc3a85d18d
commit
b969f0824f
22 changed files with 106 additions and 63 deletions
|
|
@ -4,11 +4,14 @@ import "." as M
|
|||
|
||||
M.BarSection {
|
||||
id: root
|
||||
spacing: 4
|
||||
spacing: M.Theme.moduleSpacing
|
||||
tooltip: {
|
||||
if (root.state === "wifi") return "WiFi: " + root.essid + (root.ifname ? "\nInterface: " + root.ifname : "");
|
||||
if (root.state === "eth") return "Ethernet: " + root.ifname;
|
||||
if (root.state === "linked") return "Linked: " + root.ifname;
|
||||
if (root.state === "wifi")
|
||||
return "WiFi: " + root.essid + (root.ifname ? "\nInterface: " + root.ifname : "");
|
||||
if (root.state === "eth")
|
||||
return "Ethernet: " + root.ifname;
|
||||
if (root.state === "linked")
|
||||
return "Linked: " + root.ifname;
|
||||
return "Disconnected";
|
||||
}
|
||||
|
||||
|
|
@ -50,9 +53,12 @@ M.BarSection {
|
|||
|
||||
M.BarIcon {
|
||||
icon: {
|
||||
if (root.state === "wifi") return "\uF1EB";
|
||||
if (root.state === "eth") return "\uDB80\uDE00";
|
||||
if (root.state === "linked") return "\uDB85\uDE16";
|
||||
if (root.state === "wifi")
|
||||
return "\uF1EB";
|
||||
if (root.state === "eth")
|
||||
return "\uDB80\uDE00";
|
||||
if (root.state === "linked")
|
||||
return "\uDB85\uDE16";
|
||||
return "\uDB82\uDCFD";
|
||||
}
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue