diff --git a/components/wifi-manager/code.js b/components/wifi-manager/code.js index 68c90e60..e6864cc0 100644 --- a/components/wifi-manager/code.js +++ b/components/wifi-manager/code.js @@ -448,10 +448,10 @@ function checkStatus(){ if (blockAjax) return; blockAjax = true; $.getJSON( "/status.json", function( data ) { - if(data.hasOwnProperty('ssid') && data['ssid'] != ""){ - if(data["ssid"] === selectedSSID){ + if (data.hasOwnProperty('ssid') && data['ssid'] != ""){ + if (data["ssid"] === selectedSSID){ //that's a connection attempt - if(data["urc"] === 0){ + if (data["urc"] === 0){ //got connection $("#connected-to span").text(data["ssid"]); $("#connect-details h1").text(data["ssid"]); @@ -473,7 +473,7 @@ function checkStatus(){ enableAPTimer = false; if (!recovery) enableStatusTimer = false; } - else if(data["urc"] === 1){ + else if (data["urc"] === 1){ //failed attempt $("#connected-to span").text(''); $("#connect-details h1").text(''); @@ -497,7 +497,7 @@ function checkStatus(){ enableStatusTimer = true; } } - else if(data.hasOwnProperty('urc') && data['urc'] === 0){ + else if (data.hasOwnProperty('urc') && data['urc'] === 0){ //ESP32 is already connected to a wifi without having the user do anything if( !($("#wifi-status").is(":visible")) ){ $("#connected-to span").text(data["ssid"]); @@ -512,7 +512,7 @@ function checkStatus(){ if (!recovery) enableStatusTimer = false; } } - else if(data.hasOwnProperty('urc') && data['urc'] === 2){ + else if (data.hasOwnProperty('urc') && data['urc'] === 2){ //that's a manual disconnect if($("#wifi-status").is(":visible")){ $("#wifi-status").slideUp( "fast", function() {}); @@ -546,19 +546,19 @@ function checkStatus(){ enableStatusTimer = false; } } - if(data.hasOwnProperty('project_name') && data['project_name'] != ''){ + if (data.hasOwnProperty('project_name') && data['project_name'] != ''){ pname = data['project_name']; } - if(data.hasOwnProperty('version') && data['version'] != ''){ + if (data.hasOwnProperty('version') && data['version'] != ''){ ver = data['version']; $("span#foot-fw").html("fw: "+ver+", mode: "+pname+""); } - if(data.hasOwnProperty('ota_pct') && data['ota_pct'] != 0){ + if (data.hasOwnProperty('ota_pct') && data['ota_pct'] != 0){ otapct = data['ota_pct']; $('.progress-bar').css('width', otapct+'%').attr('aria-valuenow', otapct); $('.progress-bar').html(otapct+'%'); } - if(data.hasOwnProperty('ota_dsc') && data['ota_dsc'] != ''){ + if (data.hasOwnProperty('ota_dsc') && data['ota_dsc'] != ''){ otadsc = data['ota_dsc']; $("span#flash-status").html(otadsc); if (otadsc.match(/Error:/) || otapct > 95) { @@ -568,6 +568,14 @@ function checkStatus(){ } else { $("span#flash-status").html(''); } + if (data.hasOwnProperty('message') && data['message'] != ''){ + $('#message').html(data['message']); + $("#content").fadeTo("slow", 0.3, function() { + $("#message").show(500).delay(5000).hide(500, function() { + $("#content").fadeTo("slow", 1.0); + }); + }); + } blockAjax = false; }) .fail(function() { @@ -598,7 +606,6 @@ function getConfig() { "" ); $("input#"+key).val(data[key]); - console.log(key+": "+data[key]); //TODO } } $("tbody#nvsTable").append( diff --git a/components/wifi-manager/index.html b/components/wifi-manager/index.html index c75e324f..41c01590 100644 --- a/components/wifi-manager/index.html +++ b/components/wifi-manager/index.html @@ -44,276 +44,278 @@ Credits -
+
-
-
-
-
-

Connected to:

-
-
+
+
+
+
+
+

Connected to:

+
+
+
+
+

Manual connect

+
+
ADD (HIDDEN) SSID
+
+

or choose a network...

+
-

Manual connect

-
-
ADD (HIDDEN) SSID
-
-

or choose a network...

-
-
-
-
-
-

Enter Details

-
-

Manual Connection

-
- - -
-
- - -
-
- -
-
-

Enter Password

-
-

Password for

-
- -
-
- - -
-
- -
-
-

Please wait...

-
-

Connecting to

-
-
-
-

You may lose wifi access while the esp32 recalibrates its radio. Please wait until your device automatically reconnects. This can take up to 30s.

-
-
-

Success!

-
-
-

Connection failed

-

Please double-check wifi password if any and make sure the access point has good signal.

-
-
-
- -
-
- -
-
+
-

+

Enter Details

-

+

Manual Connection

-
- -
-
-

IP Address

-
-
IP Address:
-
Subnet Mask:
-
Default Gateway:
+ +
- + +
-
-
-
-

Are you sure you would like to disconnect from this wifi?

+
+ +
+
+

Enter Password

+
+

Password for

+
+ +
+
+ + +
+
+ +
+
+

Please wait...

+
+

Connecting to

+
+
+
+

You may lose wifi access while the esp32 recalibrates its radio. Please wait until your device automatically reconnects. This can take up to 30s.

+
+
+

Success!

+
+
+

Connection failed

+

Please double-check wifi password if any and make sure the access point has good signal.

+
+
+
+ +
+
+ +
+
+
+

+
+

+
+
+ +
+
+

IP Address

+
+
IP Address:
+
Subnet Mask:
+
Default Gateway:
+
- - + +
+
+
+
+

Are you sure you would like to disconnect from this wifi?

+
+ + +
-
-
-
-

Audio output

-
-
- - +
+
+

Audio output

+
+
+ + +
+
+ + +
+
+ + +
-
- - -
-
- - +
+
+ +
+
+

Player name

+ +
+
+

Optional setting (e.g. for LMS IP address)

+ +
+ +
+ +
+ +

Squeezelite command to run

+
+ +
+
+ +
+ +

Start Squeezelite

+
+ + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
SignalI2S pinSPDIF pin
Bit clock + + + +
Word select + + + +
Data + + + +
+
+ +
+
+ +
+ + + + + + + + + +
KeyValue
+
+ +
+
+ +
+
+
+ +
+
+

Check for firmware upgrade

+
+ +
+ + + + + + + + + + + + + +
Firmware versionIDF versionRelease dateHW platformBranchFlash this FW
+

Firmware URL:

+ +
+ +
+
+
+
+ 0% +
-
- -
-
-

Player name

- -
-
-

Optional setting (e.g. for LMS IP address)

- + +
+
+

squeezelite-esp32, © 2019, philippe44, sle118, daduke
Licensed under the GPL

+

+ This app would not be possible without the following libraries: +

+
    +
  • esp32-wifi-manager, © 2017-2019, Tony Pottier. Licensed under the MIT License.
  • +
  • SpinKit, © 2015, Tobias Ahlin. Licensed under the MIT License.
  • +
  • jQuery, The jQuery Foundation. Licensed under the MIT License.
  • +
  • cJSON, © 2009-2017, Dave Gamble and cJSON contributors. Licensed under the MIT License.
  • +
+
-
- -
- -

Squeezelite command to run

-
- -
-
- -
- -

Start Squeezelite

-
- - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - -
SignalI2S pinSPDIF pin
Bit clock - - - -
Word select - - - -
Data - - - -
-
- -
-
- -
- - - - - - - - - -
KeyValue
-
- -
-
- -
-
-
- -
-
-

Check for firmware upgrade

-
- -
- - - - - - - - - - - - - -
Firmware versionIDF versionRelease dateHW platformBranchFlash this FW
-

Firmware URL:

- -
- -
-
-
-
- 0% -
-
-
-
- -
-
-

squeezelite-esp32, © 2019, philippe44, sle118, daduke
Licensed under the GPL

-

- This app would not be possible without the following libraries: -

-
    -
  • esp32-wifi-manager, © 2017-2019, Tony Pottier. Licensed under the MIT License.
  • -
  • SpinKit, © 2015, Tobias Ahlin. Licensed under the MIT License.
  • -
  • jQuery, The jQuery Foundation. Licensed under the MIT License.
  • -
  • cJSON, © 2009-2017, Dave Gamble and cJSON contributors. Licensed under the MIT License.
  • -
-
-
- +
+
-
- diff --git a/components/wifi-manager/style.css b/components/wifi-manager/style.css index aa7a8cab..15ffc4ef 100644 --- a/components/wifi-manager/style.css +++ b/components/wifi-manager/style.css @@ -331,3 +331,24 @@ td.value { #boot-div { float: right; } + +iframe#dummyframe { + float: right; +} + +div#message { + display: none; + color: #000; + background: #f00; + position:fixed; + padding: 8px; + top: 20%; + left: 50%; + width:20em; + height:4em; + text-align: center; + margin-left: -10em; /*set to a negative number 1/2 of your width*/ + margin-top: -2em; /*set to a negative number 1/2 of your height*/ + border-radius: 8px; + box-shadow: 0px 5px 2px -5px rgba(255, 255, 255, 0.5) inset, 0px 10px 20px -5px rgba(255, 255, 255, 0.1) inset, 0 0px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 1px rgba(0, 0, 0, 0.12), 0 1px 10px 0 rgba(0, 0, 0, 0.3); +}