Skip to content

Commit

Permalink
SW-2540 Add color coding to signal strengths (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
khaledsherkawi authored Mar 10, 2023
1 parent 5395a9b commit 444b9ab
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
12 changes: 12 additions & 0 deletions octoprint_netconnectd/static/css/netconnectd.css
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,16 @@ table th.settings_plugin_netconnectd_wifis_action a.disabled, table td.settings_
#settings_plugin_netconnectd table .settings_plugin_netconnectd_wifis_quality{
padding: 10px 5px !important;
}
#settings_plugin_netconnectd table .good .bar {
background-color: #16a085;
border: thin solid darken(#16a085, 7%);
}
#settings_plugin_netconnectd table .bad .bar {
background-color: #e74c3c;
border: thin solid darken(#e74c3c, 20%);
}
#settings_plugin_netconnectd table .ok .bar {
background-color: #f1c40f;
border: thin solid darken(#f1c40f, 7%);
}
/*Signal Bars*/
8 changes: 4 additions & 4 deletions octoprint_netconnectd/static/js/netconnectd.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,13 +483,13 @@ $(function() {

self.signalQuality = function (quality){
if(quality >= 60){
return 'four-bars';
return 'good four-bars';
}else if(quality >= 40){
return 'three-bars'
return 'ok three-bars'
}else if(quality >= 20){
return 'two-bars'
return 'bad two-bars'
}else{
return 'one-bar'
return 'bad one-bar'
}
}

Expand Down

0 comments on commit 444b9ab

Please sign in to comment.