1
1
mirror of https://github.com/OpenVoiceOS/OpenVoiceOS synced 2025-06-05 22:19:21 +02:00

Bump wifi-connect

This commit is contained in:
j1nx
2020-12-22 22:16:24 +01:00
parent e8ed2064d1
commit 782e48887c
18 changed files with 84 additions and 64 deletions

File diff suppressed because one or more lines are too long

View File

@@ -5,27 +5,43 @@ object-assign
*/
/*!
* The buffer module from node.js, for the browser.
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <http://feross.org>
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
/*!
* repeat-string <https://github.com/jonschlinkert/repeat-string>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
Copyright (c) Microsoft Corporation.
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/**
* Prism: Lightweight, robust, elegant syntax highlighting
*
* @license MIT <https://opensource.org/licenses/MIT>
* @author Lea Verou <https://lea.verou.me>
* @namespace
* @public
*/
/** @license React v0.19.1
* scheduler.production.min.js
*

View File

@@ -0,0 +1 @@
(this["webpackJsonpwifi-connect-ui"]=this["webpackJsonpwifi-connect-ui"]||[]).push([[0],{1212:function(e,t,n){"use strict";n.r(t);var a=n(0),i=n.n(a),o=n(54),r=n.n(o),s=(n(488),n(489),n(80)),c=n(424),l=n(425),u=n.n(l),m=n(1223),d=n(1221),f=n(475),p=n(33),h=n(81),b=n(1222),g=function(e){var t;return{type:"object",properties:{ssid:{title:"SSID",type:"string",default:null===(t=e[0])||void 0===t?void 0:t.ssid,oneOf:e.map((function(e){return{const:e.ssid,title:e.ssid}}))},identity:{title:"User",type:"string",default:""},passphrase:{title:"Passphrase",type:"string",default:""}},required:["ssid"]}},w=function(e){var t,n,i,o=e.availableNetworks,r=e.onSubmit,c=a.useState({}),l=Object(s.a)(c,2),u=l[0],m=l[1],d=(t=o,n=u.ssid,t.some((function(e){return e.ssid===n&&"enterprise"===e.security})));return a.createElement(p.a,{flexDirection:"column",alignItems:"center",justifyContent:"center",m:4,mt:5},a.createElement(h.a.h3,{align:"center",mb:4},"Hi! Please choose your WiFi from the list"),a.createElement(b.a,{width:["100%","80%","60%","40%"],onFormChange:function(e){var t=e.formData;m(t)},onFormSubmit:function(e){var t=e.formData;return r(t)},value:u,schema:g(o),uiSchema:(i=d,{ssid:{"ui:placeholder":"Select SSID","ui:options":{emphasized:!0}},identity:{"ui:options":{emphasized:!0},"ui:widget":i?void 0:"hidden"},passphrase:{"ui:widget":"password","ui:options":{emphasized:!0}}}),submitButtonProps:{width:"60%",mx:"20%",mt:3,disabled:o.length<=0},submitButtonText:"Connect"}))},y=n(478),E=n(18),v=function(e){var t=e.hasAvailableNetworks,n=e.attemptedConnect,i=e.error;return a.createElement(a.Fragment,null,n&&a.createElement(y.a,{m:2,info:!0},a.createElement(E.d.span,null,"Applying changes... "),a.createElement(E.d.span,null,"Your device will soon be online. If connection is unsuccessful, the Access Point will be back up in a few minutes, and reloading this page will allow you to try again.")),!t&&a.createElement(y.a,{m:2,warning:!0},a.createElement(E.d.span,null,"No wifi networks available.\xa0"),a.createElement(E.d.span,null,"Please ensure there is a network within range and reboot the device.")),!!i&&a.createElement(y.a,{m:2,danger:!0},a.createElement(E.d.span,null,i)))},S=n(1);function k(){var e=Object(c.a)(["\n\tbody {\n\t\tmargin: 0;\n\t\tfont-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n\t\t\t'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n\t\t\tsans-serif;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t}\n\n\tcode {\n\t\tfont-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;\n\t}\n"]);return k=function(){return e},e}var j=Object(S.createGlobalStyle)(k()),O=function(){var e=i.a.useState(!1),t=Object(s.a)(e,2),n=t[0],a=t[1],o=i.a.useState(!0),r=Object(s.a)(o,2),c=r[0],l=r[1],p=i.a.useState(""),h=Object(s.a)(p,2),b=h[0],g=h[1],y=i.a.useState([]),E=Object(s.a)(y,2),S=E[0],k=E[1];i.a.useEffect((function(){fetch("/networks").then((function(e){if(200!==e.status)throw new Error(e.statusText);return e.json()})).then(k).catch((function(e){g("Failed to fetch available networks. ".concat(e.message||e))})).finally((function(){l(!1)}))}),[]);return i.a.createElement(m.a,null,i.a.createElement(j,null),i.a.createElement(d.a,{brand:i.a.createElement("img",{src:u.a,style:{height:30},alt:"logo"})}),i.a.createElement(f.a,null,i.a.createElement(v,{attemptedConnect:n,hasAvailableNetworks:c||S.length>0,error:b}),i.a.createElement(w,{availableNetworks:S,onSubmit:function(e){a(!0),g(""),fetch("/connect",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}).then((function(e){if(200!==e.status)throw new Error(e.statusText)})).catch((function(e){g("Failed to connect to the network. ".concat(e.message||e))}))}})))};r.a.render(i.a.createElement(O,null),document.getElementById("root"))},425:function(e,t,n){e.exports=n.p+"static/media/logo.34c0c94e.svg"},483:function(e,t,n){e.exports=n(1212)}},[[483,1,2]]]);

View File

@@ -1 +0,0 @@
(this["webpackJsonpwifi-connect-ui"]=this["webpackJsonpwifi-connect-ui"]||[]).push([[0],{1006:function(e,t,n){"use strict";n.r(t);var a=n(0),i=n.n(a),r=n(36),o=n.n(r),s=(n(450),n(451),n(453),n(93)),c=n(423),l=n.n(c),u=n(1012),m=n(1010),d=n(443),f=n(63),h=n(1007),p=n(429),w=function(e){var t;return{type:"object",properties:{ssid:{title:"SSID",type:"string",default:null===(t=e[0])||void 0===t?void 0:t.ssid,oneOf:e.map((function(e){return{const:e.ssid,title:e.ssid}}))},identity:{title:"User",type:"string",default:""},passphrase:{title:"Passphrase",type:"string"}},required:["ssid"]}},g=function(e){var t,n=e.availableNetworks,i=e.onSubmit,r=a.useState({}),o=Object(s.a)(r,2),c=o[0],l=o[1],u=function(e,t){var n=e.filter((function(e){return t===e.ssid}))[0];return!!n&&"enterprise"===n.security}(n,c.ssid);return a.createElement(f.a,{flexDirection:"column",alignItems:"center",justifyContent:"center",m:4,mt:5},a.createElement(h.a.h3,{align:"center",mb:4},"Hi! Please choose your WiFi from the list"),a.createElement(p.Form,{width:["100%","80%","60%","40%"],onFormChange:function(e){var t=e.formData;l(t)},onFormSubmit:function(e){var t=e.formData;return i(t)},value:c,schema:w(n),uiSchema:(t=u,{ssid:{"ui:placeholder":"Select SSID","ui:options":{emphasized:!0}},identity:{"ui:options":{emphasized:!0},"ui:widget":t?void 0:"hidden"},passphrase:{"ui:widget":"password","ui:options":{emphasized:!0}}}),submitButtonProps:{width:"60%",mx:"20%",mt:3,disabled:n.length<=0},submitButtonText:"Connect"}))},b=n(1011),E=n(58),v=function(e){var t=e.hasAvailableNetworks,n=e.attemptedConnect,i=e.error;return a.createElement(a.Fragment,null,n&&a.createElement(b.a,{m:2,info:!0},a.createElement(E.d.span,null,"Applying changes... "),a.createElement(E.d.span,null,"Your device will soon be online. If connection is unsuccessful, the Access Point will be back up in a few minutes, and reloading this page will allow you to try again.")),!t&&a.createElement(b.a,{m:2,warning:!0},a.createElement(E.d.span,null,"No wifi networks available.\xa0"),a.createElement(E.d.span,null,"Please ensure there is a network within range and reboot the device.")),!!i&&a.createElement(b.a,{m:2,danger:!0},a.createElement(E.d.span,null,i)))},y=function(){var e=i.a.useState(!1),t=Object(s.a)(e,2),n=t[0],a=t[1],r=i.a.useState(!0),o=Object(s.a)(r,2),c=o[0],f=o[1],h=i.a.useState(""),p=Object(s.a)(h,2),w=p[0],b=p[1],E=i.a.useState([]),y=Object(s.a)(E,2),S=y[0],k=y[1];i.a.useEffect((function(){fetch("/networks").then((function(e){if(200!==e.status)throw new Error(e.statusText);return e.json()})).then(k).catch((function(e){b("Failed to fetch available networks. ".concat(e.message||e))})).finally((function(){f(!1)}))}),[]);return i.a.createElement(u.a,null,i.a.createElement(m.a,{brand:i.a.createElement("img",{src:l.a,style:{height:30},alt:"logo"})}),i.a.createElement(d.a,null,i.a.createElement(v,{attemptedConnect:n,hasAvailableNetworks:c||S.length>0,error:w}),i.a.createElement(g,{availableNetworks:S,onSubmit:function(e){a(!0),b(""),fetch("/connect",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}).then((function(e){if(200!==e.status)throw new Error(e.statusText)})).catch((function(e){b("Failed to connect to the network. ".concat(e.message||e))}))}})))};o.a.render(i.a.createElement(y,null),document.getElementById("root"))},423:function(e,t,n){e.exports=n.p+"static/media/logo.69120045.svg"},445:function(e,t,n){e.exports=n(1006)},453:function(e,t,n){}},[[445,1,2]]]);