updating states and adding icons

This commit is contained in:
dlprows 2023-08-24 22:25:40 -06:00
parent ff229676d7
commit a5ac31de17
21 changed files with 18 additions and 14 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 999 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -7,24 +7,28 @@
"Icon": "Images/icon",
"States": [
{
"Image": "Images/pluginAction",
"Image": "Images/proxyDisabled",
"TitleAlignment": "middle",
"FontSize": "12"
"FontSize": "12",
"Title" : "Disabled"
},
{
"Image": "Images/pluginAction",
"Image": "Images/proxyEnabled",
"TitleAlignment": "middle",
"FontSize": "12"
"FontSize": "12",
"Title": "Enabled"
},
{
"Image": "Images/pluginAction",
"Image": "Images/noNetwork",
"TitleAlignment": "middle",
"FontSize": "12"
"FontSize": "12",
"Title": "No Network"
},
{
"Image": "Images/pluginAction",
"Image": "Images/error",
"TitleAlignment": "middle",
"FontSize": "12"
"FontSize": "12",
"Title": "Error"
}
],
"Controllers": [ "Keypad" ],

View File

@ -104,9 +104,9 @@ func toggleVpn() error {
func getState() int {
/*
0 for no network
1 for proxy off
2 for proxy on
0 for proxy off
1 for proxy on
2 for no network
3 for busted
*/
activeDevice, err := networking.GetActiveDevice()
@ -116,7 +116,7 @@ func getState() int {
}
if activeDevice == "" {
return 0
return 2
}
proxyEnabled, err := networking.IsProxyEnabled(activeDevice)
@ -125,7 +125,7 @@ func getState() int {
return 3
}
if proxyEnabled {
return 2
return 1
}
return 1
return 0
}