index.html 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8"/>
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
  6. <meta name="apple-mobile-web-app-capable" content="yes" />
  7. <link rel="stylesheet" href="/style.css">
  8. <script src="/jquery.js"></script>
  9. <script src="/code.js"></script>
  10. <title>esp32-wifi-manager</title>
  11. </head>
  12. <body>
  13. <div id="app">
  14. <div id="app-wrap">
  15. <div id="command_line">
  16. <header>
  17. <h1>Startup command</h1>
  18. </header>
  19. <h2>
  20. <div id="autoexec" class="toggle">
  21. <label>Run squeezelite automatically at boot
  22. <input id="autoexec-cb" type="checkbox" checked="checked" onclick='handleClick(this);'/><span class="slider"></span>
  23. </label>
  24. </div>
  25. </h2>
  26. <div id="autoexec-command">
  27. <div id="audioout" class="toggle-buttons">
  28. <h2>Audio output</h2>
  29. <input type="radio" id="i2s" name="audio" checked='checked' />
  30. <label for="i2s">I2S</label>
  31. <input type="radio" id="spdif" name="audio" />
  32. <label for="spdif">SPDIF</label>
  33. <input type="radio" id="bt" name="audio" />
  34. <label for="bt">Bluetooth</label>
  35. </div>
  36. <div id="btsinkdiv">
  37. <input id="btsink" type="text" value="BT sink name" />
  38. </div>
  39. <div>
  40. <h2>Player name</h2>
  41. <input id="player" type="text" value="squeezelite" />
  42. </div>
  43. <div>
  44. <h2>Optional setting (e.g. for LMS IP address)</h2>
  45. <input id="optional" type="text" value="" placeholder="-s 192.168.0.1" />
  46. </div>
  47. <div class="buttons">
  48. <input id="generate-command" type="button" value="Generate" />
  49. </div>
  50. <h2>Squeezelite command to run</h2>
  51. <section id="command-list">
  52. <textarea id="autoexec1" maxlength="120">squeezelite -o I2S -b 500:2000 -d all=info -M esp32</textarea>
  53. </section>
  54. </div>
  55. <div class="buttons">
  56. <input id="update-command" type="button" value="Save" />
  57. </div>
  58. </div>
  59. <div id="recoverydiv">
  60. <header><h1>System management</h1></header>
  61. <h2>Check for firmware upgrade</h2>
  62. <div class="buttons">
  63. <input type="button" id="fwcheck" value="Check" onclick='handleClick(this);' />
  64. <p><span id="currentfw">Currently running: 0.1</span> - <span id="latestfw">latest available version: 0.2</span></p>
  65. </div>
  66. <h2>Reboot to recovery system to perform firmware upgrade</h2>
  67. <div class="buttons">
  68. <input type="button" id="recovery" value="Recovery" onclick='handleClick(this);' />
  69. </div>
  70. </div>
  71. <div id="otadiv">
  72. <header><h1>Firmware upgrade</h1></header>
  73. <form name="multipart" action="otaform" method="post" enctype="multipart/form-data" onsubmit="do_upload(this); return false;">
  74. <progress id="progr" value="0" max="100" >Upload Progress</progress>
  75. <input type="file" name="ota" id="ota" size="20" accept=".bin" onchange="file_change();">
  76. <span id="file_info"></span>
  77. <input type="submit" id="update" disabled="" value="Upload">
  78. </form>
  79. <h2>Reboot system with new firmware</h2>
  80. <div class="buttons">
  81. <input type="button" id="reboot" value="Reboot" onclick='handleClick(this);' />
  82. </div>
  83. </div>
  84. <div id="wifi">
  85. <header>
  86. <h1>Wi-Fi</h1>
  87. </header>
  88. <div id="wifi-status">
  89. <h2>Connected to:</h2>
  90. <section id="connected-to">
  91. <div class="ape"><div class="w0"><div class="pw"><span></span></div></div></div>
  92. </section>
  93. </div>
  94. <h2>Manual connect</h2>
  95. <section id="manual_add">
  96. <div class="ape">ADD (HIDDEN) SSID<div>
  97. </section>
  98. <h2>or choose a network...</h2>
  99. <section id="wifi-list">
  100. </section>
  101. <div id="pwrdby"><em>Powered by </em><a id="acredits" href="#"><strong>esp32-wifi-manager</strong></a>.</div>
  102. </div>
  103. <div id="connect_manual">
  104. <header>
  105. <h1>Enter Details</h1>
  106. </header>
  107. <h2>Manual Connection</h2>
  108. <section>
  109. <input id="manual_ssid" type="text" placeholder="SSID" value="">
  110. <input id="manual_pwd" type="password" placeholder="Password" value="">
  111. </section>
  112. <div class="buttons">
  113. <input id="manual_join" type="button" value="Join" data-connect="manual" />
  114. <input id="manual_cancel" type="button" value="Cancel"/>
  115. </div>
  116. </div>
  117. <div id="connect">
  118. <header>
  119. <h1>Enter Password</h1>
  120. </header>
  121. <h2>Password for <span id="ssid-pwd"></span></h2>
  122. <section>
  123. <input id="pwd" type="password" placeholder="Password" value="">
  124. </section>
  125. <div class="buttons">
  126. <input id="join" type="button" value="Join" />
  127. <input id="cancel" type="button" value="Cancel"/>
  128. </div>
  129. </div>
  130. <div id="connect-wait">
  131. <header>
  132. <h1>Please wait...</h1>
  133. </header>
  134. <h2>Connecting to <span id="ssid-wait"></span></h2>
  135. <section>
  136. <div id="loading">
  137. <div class="spinner"><div class="double-bounce1"></div><div class="double-bounce2"></div></div>
  138. <p class="tctr">You may lose wifi access while the esp32 recalibrates its radio. Please wait until your device automatically reconnects. This can take up to 30s.</p>
  139. </div>
  140. <div id="connect-success">
  141. <h3 class="gr">Success!</h3>
  142. </div>
  143. <div id="connect-fail">
  144. <h3 class="rd">Connection failed</h3>
  145. <p class="tctr">Please double-check wifi password if any and make sure the access point has good signal.</p>
  146. </div>
  147. </section>
  148. <div class="buttons">
  149. <input id="ok-connect" type="button" value="OK" class="ctr" />
  150. </div>
  151. </div>
  152. <div id="connect-details">
  153. <div id="connect-details-wrap">
  154. <header>
  155. <h1></h1>
  156. </header>
  157. <h2></h2>
  158. <section>
  159. <div class="buttons">
  160. <input id="disconnect" type="button" value="Disconnect" class="ctr"/>
  161. </div>
  162. </section>
  163. <h2>IP Address</h2>
  164. <section>
  165. <div class="ape brdb">IP Address:<div id="ip" class="fr"></div></div>
  166. <div class="ape brdb">Subnet Mask:<div id="netmask" class="fr"></div></div>
  167. <div class="ape">Default Gateway:<div id="gw" class="fr"></div></div>
  168. </section>
  169. <div class="buttons">
  170. <input id="ok-details" type="button" value="OK" class="ctr" />
  171. </div>
  172. </div>
  173. <div id="diag-disconnect" class="diag-box">
  174. <div class="diag-box-win">
  175. <p>Are you sure you would like to disconnect from this wifi?</p>
  176. <div class="buttons">
  177. <input id="no-disconnect" type="button" value="No" />
  178. <input id="yes-disconnect" type="button" value="Yes" />
  179. </div>
  180. </div>
  181. </div>
  182. </div>
  183. </div>
  184. </div>
  185. <div id="credits">
  186. <header>
  187. <h1>About this app...</h1>
  188. </header>
  189. <h2></h2>
  190. <section>
  191. <p><strong>esp32-wifi-manager</strong>, &copy; 2017-2019, Tony Pottier<br />Licender under the MIT License.</p>
  192. <p>
  193. This app would not be possible without the following libraries:
  194. </p>
  195. <ul>
  196. <li>SpinKit, &copy; 2015, Tobias Ahlin. Licensed under the MIT License.</li>
  197. <li>jQuery, The jQuery Foundation. Licensed under the MIT License.</li>
  198. <li>cJSON, &copy; 2009-2017, Dave Gamble and cJSON contributors. Licensed under the MIT License.</li>
  199. </ul>
  200. </section>
  201. <div class="buttons">
  202. <input id="ok-credits" type="button" value="OK" class="ctr" />
  203. </div>
  204. </div>
  205. </body>
  206. <html>