diff --git a/.web-build_do.sh b/_web-build_do.sh similarity index 75% rename from .web-build_do.sh rename to _web-build_do.sh index f43daa7..a037de7 100755 --- a/.web-build_do.sh +++ b/_web-build_do.sh @@ -11,7 +11,7 @@ rm -rf "$BLDDIR/js" rm -rf "$BLDDIR/css" cd "$SRCDIR" -gulp +gulp --production cd .. cp -R "$SRCDIR/css" "$BLDDIR" @@ -23,3 +23,4 @@ mkdir -p "$BLDDIR/pages" php "$SRCDIR/home.php" > "$BLDDIR/pages/home.tpl" php "$SRCDIR/wifi.php" > "$BLDDIR/pages/wifi.tpl" +php "$SRCDIR/waveform.php" > "$BLDDIR/pages/wfm.html" # no substitutions, .html allows to gzip it. diff --git a/html/css/app.css b/html/css/app.css index b1e4822..295bac7 100644 --- a/html/css/app.css +++ b/html/css/app.css @@ -1,1087 +1 @@ -@charset "UTF-8"; -/* normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ -/** - * 1. Set default font family to sans-serif. - * 2. Prevent iOS and IE text size adjust after device orientation change, - * without disabling user zoom. - */ -*, *:before, *:after { - box-sizing: border-box; } - -html { - font-family: sans-serif; - /* 1 */ - -ms-text-size-adjust: 100%; - /* 2 */ - -webkit-text-size-adjust: 100%; - /* 2 */ } - -/** - * Remove default margin. - */ -body { - margin: 0; } - -/* HTML5 display definitions - ========================================================================== */ -/** - * Correct `block` display not defined for any HTML5 element in IE 8/9. - * Correct `block` display not defined for `details` or `summary` in IE 10/11 - * and Firefox. - * Correct `block` display not defined for `main` in IE 11. - */ -figure, -nav { - display: block; } - -/** - * 1. Correct `inline-block` display not defined in IE 8/9. - * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. - */ -canvas, -progress { - display: inline-block; - /* 1 */ - vertical-align: baseline; - /* 2 */ } - -/** - * Prevent modern browsers from displaying `audio` without controls. - * Remove excess height in iOS 5 devices. - */ -/** - * Address `[hidden]` styling not present in IE 8/9/10. - * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22. - */ -[hidden] { - display: none; } - -/* Links - ========================================================================== */ -/** - * Remove the gray background color from active links in IE 10. - */ -a { - background-color: transparent; } - -/** - * Improve readability of focused elements when they are also in an - * active/hover state. - */ -a:active, -a:hover { - outline: 0; } - -/* Text-level semantics - ========================================================================== */ -/** - * Address styling not present in IE 8/9/10/11, Safari, and Chrome. - */ -/** - * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. - */ -b { - font-weight: bold; } - -/** - * Address styling not present in Safari and Chrome. - */ -/** - * Address variable `h1` font-size and margin within `section` and `article` - * contexts in Firefox 4+, Safari, and Chrome. - */ -h1 { - font-size: 2em; - margin: 0.67em 0; } - -h2 { - font-size: 2em; - margin: 0.67em 0; } - -/** - * Address styling not present in IE 8/9. - */ -/** - * Address inconsistent and variable font size in all browsers. - */ -small { - font-size: 80%; } - -/** - * Prevent `sub` and `sup` affecting `line-height` in all browsers. - */ -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; } - -sup { - top: -0.5em; } - -sub { - bottom: -0.25em; } - -/* Embedded content - ========================================================================== */ -/** - * Remove border when inside `a` element in IE 8/9/10. - */ -img { - border: 0; } - -/** - * Correct overflow not hidden in IE 9/10/11. - */ -svg:not(:root) { - overflow: hidden; } - -/* Grouping content - ========================================================================== */ -/** - * Address margin not present in IE 8/9 and Safari. - */ -/** - * Address differences between Firefox and other browsers. - */ -hr { - box-sizing: content-box; - height: 0; } - -/** - * Contain overflow in all browsers. - */ -pre { - overflow: auto; } - -/** - * Address odd `em`-unit font size rendering in all browsers. - */ -code, -pre { - font-family: monospace; - font-size: 1em; } - -/* Forms - ========================================================================== */ -/** - * Known limitation: by default, Chrome and Safari on OS X allow very limited - * styling of `select`, unless a `border` property is set. - */ -/** - * 1. Correct color not being inherited. - * Known issue: affects color of disabled elements. - * 2. Correct font properties not being inherited. - * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. - */ -button, -input, -select, -textarea { - color: inherit; - /* 1 */ - font: inherit; - /* 2 */ - margin: 0; - /* 3 */ } - -/** - * Address `overflow` set to `hidden` in IE 8/9/10/11. - */ -button { - overflow: visible; } - -/** - * Address inconsistent `text-transform` inheritance for `button` and `select`. - * All other form control elements do not inherit `text-transform` values. - * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. - * Correct `select` style inheritance in Firefox. - */ -button, -select { - text-transform: none; } - -/** - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Correct inability to style clickable `input` types in iOS. - * 3. Improve usability and consistency of cursor style between image-type - * `input` and others. - */ -button, -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; - /* 2 */ - cursor: pointer; - /* 3 */ } - -/** - * Re-set default cursor for disabled elements. - */ -button[disabled], -html input[disabled] { - cursor: default; } - -/** - * Remove inner padding and border in Firefox 4+. - */ -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; } - -/** - * Address Firefox 4+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. - */ -input { - line-height: normal; } - -/** - * It's recommended that you don't attempt to style these elements. - * Firefox's implementation doesn't respect box-sizing, padding, or width. - * - * 1. Address box sizing set to `content-box` in IE 8/9/10. - * 2. Remove excess padding in IE 8/9/10. - */ -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; - /* 1 */ - padding: 0; - /* 2 */ } - -/** - * Fix the cursor style for Chrome's increment/decrement buttons. For certain - * `font-size` values of the `input`, it causes the cursor style of the - * decrement button to change from `default` to `text`. - */ -/** - * 1. Address `appearance` set to `searchfield` in Safari and Chrome. - * 2. Address `box-sizing` set to `border-box` in Safari and Chrome. - */ -/** - * Remove inner padding and search cancel button in Safari and Chrome on OS X. - * Safari (but not Chrome) clips the cancel button when the search input has - * padding (and `textfield` appearance). - */ -/** - * Define consistent border, margin, and padding. - */ -/** - * 1. Correct `color` not being inherited in IE 8/9/10/11. - * 2. Remove padding so people aren't caught out if they zero out fieldsets. - */ -legend { - border: 0; - /* 1 */ - padding: 0; - /* 2 */ } - -/** - * Remove default vertical scrollbar in IE 8/9/10/11. - */ -textarea { - overflow: auto; } - -/** - * Don't inherit the `font-weight` (applied by a rule above). - * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. - */ -/* Tables - ========================================================================== */ -/** - * Remove most spacing between table cells. - */ -table { - border-collapse: collapse; - border-spacing: 0; } - -td, -th { - padding: 0; } - -html { - box-sizing: border-box; } - -*, *::after, *::before { - box-sizing: inherit; } - -.center { - text-align: center; } - -html { - font-family: Arial, sans-serif; - color: #D0D0D0; - background: #131315; } - -html, body { - border: 0 none; - margin: 0; - padding: 0; - text-decoration: none; - width: 100%; - height: 100%; - overflow: hidden; } - -/* Main outer container */ -#outer { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - position: absolute; - width: 100%; - height: 100%; - left: 0; - right: 0; - top: 0; - bottom: 0; - overflow: hidden; - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; } - -@media screen and (max-width: 544px) { - #outer { - display: block; - overflow-y: scroll; } } - -#menu { - -webkit-box-flex: 0; - -webkit-flex: 0 0 15rem; - -ms-flex: 0 0 15rem; - flex: 0 0 15rem; - background: #2bab5f; } - #menu > * { - display: block; - text-decoration: none; - padding: 0.6180469716rem 1rem; - white-space: nowrap; - word-wrap: normal; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; } - #menu #brand { - color: white; - background: #218248; - font-size: 120%; - text-align: center; - position: relative; - margin-bottom: 1rem; } - @media screen and (max-width: 544px) { - #menu #brand { - background: #2bab5f; - cursor: pointer; } - #menu #brand:after { - position: absolute; - color: rgba(0, 0, 0, 0.2); - right: 1rem; - content: '>'; - top: 50%; - font-size: 120%; - font-weight: bold; - -webkit-transform: translate(0, -50%) rotate(90deg); - transform: translate(0, -50%) rotate(90deg); } } - #menu.expanded #brand { - background: #218248; } - @media screen and (max-width: 544px) { - #menu.expanded #brand:after { - -webkit-transform: translate(0, -50%) rotate(-90deg); - transform: translate(0, -50%) rotate(-90deg); } } - #menu a { - font-size: 130%; - color: white; - -webkit-transition: background-color 0.2s; - transition: background-color 0.2s; - text-shadow: 0 0 5px rgba(0, 0, 0, 0.4); } - #menu a:hover, #menu a.selected { - background: #1bd886; - text-shadow: 0 0 5px rgba(0, 0, 0, 0.6); } - #menu a.selected { - position: relative; - box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); } - #menu a:before { - content: "▸"; - padding-right: .5rem; - position: relative; - top: -0.1rem; } - @media screen and (max-width: 544px) { - #menu a { - display: none; } } - #menu.expanded a { - display: block; } - @media screen and (min-width: 545px) and (max-width: 1000px) { - #menu { - -webkit-flex-basis: 10rem; - -ms-flex-preferred-size: 10rem; - flex-basis: 10rem; } - #menu #brand { - font-size: 95%; - margin-bottom: 0.6180469716rem; } - #menu a { - font-size: 105%; } - #menu > * { - padding: 0.3819820591rem 0.6180469716rem; } } - -#content { - -webkit-box-flex: 1; - -webkit-flex-grow: 1; - -ms-flex-positive: 1; - flex-grow: 1; - overflow-y: auto; - padding: 1rem; } - @media screen and (max-width: 544px) { - #content { - padding: 0.6180469716rem; } } - #content a, #content a:visited, #content a:link { - color: #5abfff; - text-decoration: none; } - #content a:hover { - color: #5abfff; - text-decoration: underline; } - #content > * { - margin-left: auto; - margin-right: auto; } - #content h1 { - text-align: center; - font-size: 2.2806973457em; - margin-top: 0; - margin-bottom: 1rem; } - #content h2 { - font-size: 1.423828125em; - margin-bottom: 0.6180469716rem; } - #content td, #content th { - padding: 0.3819820591rem; } - #content tbody th { - text-align: right; - width: 130px; - color: white; } - -.Box { - display: block; - max-width: 900px; - margin-top: 1rem; - padding: 0.6180469716rem; - border-radius: 3px; - background-color: rgba(255, 255, 255, 0.07); } - @media screen and (max-width: 544px) { - .Box { - margin-top: 0.6180469716rem; } } - h1 + .Box { - margin-top: 0; } - .Box h2 { - margin-top: 0; } - .Box.wide { - width: initial; - max-width: initial; } - -.Modal { - position: fixed; - width: 100%; - height: 100%; - left: 0; - top: 0; - right: 0; - bottom: 0; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - -webkit-transition: opacity .5s; - transition: opacity .5s; - background: rgba(0, 0, 0, 0.65); - opacity: 0; } - .Modal.visible { - opacity: 1; } - .Modal.hidden { - display: none; } - -.Dialog { - margin: 0.6180469716rem; - padding: 1rem 0.6180469716rem; - overflow: hidden; - max-width: 100%; - max-height: 100%; - -webkit-box-flex: 0; - -webkit-flex: 0 1 30rem; - -ms-flex: 0 1 30rem; - flex: 0 1 30rem; - background: #1c1c1e; - border-left: 6px solid #217b3a; - border-right: 6px solid #217b3a; - box-shadow: 0 0 2px 0 #434349, 0 0 6px 0 black; - border-radius: 6px; } - -button, input[type="button"], input[type="reset"], input[type="submit"], a.button { - text-align: center; - cursor: pointer; - display: inline-block; - border-radius: 2px; - padding: 0 0.6em; - border: 0 none; - outline: 0 none !important; - line-height: 1.8em; - font-size: 1.1em; - margin-bottom: 3px; - min-width: 5em; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - /* &::before { - margin-right: .4em; - } - - &.icononly::before { - margin-right: 0; - }*/ - text-shadow: 1.5px 1.5px 2px rgba(0, 0, 0, 0.8); } - button:active, input[type="button"]:active, input[type="reset"]:active, input[type="submit"]:active, a.button:active { - position: relative; - top: 2px; } - button.narrow, input[type="button"].narrow, input[type="reset"].narrow, input[type="submit"].narrow, a.button.narrow { - min-width: initial; } - -input[type="submit"], .btn-green { - background-color: #2ca94b; - box-shadow: 0 3px 0 #1d7032; - color: #FEFEFE; } - input[type="submit"]:hover, input[type="submit"]:active, input[type="submit"].active, input[type="submit"].selected, .btn-green:hover, .btn-green:active, .btn-green.active, .btn-green.selected { - background-color: #28ba5c; - color: #FEFEFE; } - input[type="submit"]:hover, input[type="submit"].selected, input[type="submit"].active, .btn-green:hover, .btn-green.selected, .btn-green.active { - box-shadow: 0 3px 0 #1a773b; } - input[type="submit"]:active, .btn-green:active { - box-shadow: 0 1px 0 #1a773b; } - -input[type="reset"], .btn-red { - background-color: #D04E51; - box-shadow: 0 3px 0 #aa2d30; - color: #FEFEFE; } - input[type="reset"]:hover, input[type="reset"]:active, input[type="reset"].active, input[type="reset"].selected, .btn-red:hover, .btn-red:active, .btn-red.active, .btn-red.selected { - background-color: #d4403f; - color: #FEFEFE; } - input[type="reset"]:hover, input[type="reset"].selected, input[type="reset"].active, .btn-red:hover, .btn-red.selected, .btn-red.active { - box-shadow: 0 3px 0 #9e2423; } - input[type="reset"]:active, .btn-red:active { - box-shadow: 0 1px 0 #9e2423; } - -/* - -&[type="submit"], -&.gray-green { - @include fancy-btn-colors-full( - $btn-gray-f, $btn-gray-b, $btn-gray-l, - $btn-green-fa, $btn-green-ba, darken($btn-green-ba, 16) - ) -} - -&.gray-blue { - @include fancy-btn-colors-full( - $btn-gray-f, $btn-gray-b, $btn-gray-l, - $btn-blue-fa, $btn-blue-ba, darken($btn-blue-ba, 16) - ) -} - -&.gray-red { - @include fancy-btn-colors-full( - $btn-gray-f, $btn-gray-b, $btn-gray-l, - $btn-red-fa, $btn-red-ba, darken($btn-red-ba, 16) - ) -} - -&.gray-orange { - @include fancy-btn-colors-full( - $btn-gray-f, $btn-gray-b, $btn-gray-l, - $btn-orange-fa, $btn-orange-ba, darken($btn-orange-ba, 16) - ) -} - -// No change on hover - to be used for disabled buttons -&.gray-gray { - @include fancy-btn-colors-full( - $btn-gray-f, $btn-gray-b, $btn-gray-l, - $btn-gray-f, $btn-gray-b, $btn-gray-l - ) -} - -*/ -button, input[type="button"], input[type="reset"], input[type="submit"], a.button { - text-align: center; - cursor: pointer; - display: inline-block; - border-radius: 2px; - padding: 0 0.6em; - border: 0 none; - outline: 0 none !important; - line-height: 1.8em; - font-size: 1.1em; - margin-bottom: 3px; - min-width: 5em; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - /* &::before { - margin-right: .4em; - } - - &.icononly::before { - margin-right: 0; - }*/ - text-shadow: 1.5px 1.5px 2px rgba(0, 0, 0, 0.8); } - button:active, input[type="button"]:active, input[type="reset"]:active, input[type="submit"]:active, a.button:active { - position: relative; - top: 2px; } - button.narrow, input[type="button"].narrow, input[type="reset"].narrow, input[type="submit"].narrow, a.button.narrow { - min-width: initial; } - -input[type="submit"], .btn-green { - background-color: #2ca94b; - box-shadow: 0 3px 0 #1d7032; - color: #FEFEFE; } - input[type="submit"]:hover, input[type="submit"]:active, input[type="submit"].active, input[type="submit"].selected, .btn-green:hover, .btn-green:active, .btn-green.active, .btn-green.selected { - background-color: #28ba5c; - color: #FEFEFE; } - input[type="submit"]:hover, input[type="submit"].selected, input[type="submit"].active, .btn-green:hover, .btn-green.selected, .btn-green.active { - box-shadow: 0 3px 0 #1a773b; } - input[type="submit"]:active, .btn-green:active { - box-shadow: 0 1px 0 #1a773b; } - -input[type="reset"], .btn-red { - background-color: #D04E51; - box-shadow: 0 3px 0 #aa2d30; - color: #FEFEFE; } - input[type="reset"]:hover, input[type="reset"]:active, input[type="reset"].active, input[type="reset"].selected, .btn-red:hover, .btn-red:active, .btn-red.active, .btn-red.selected { - background-color: #d4403f; - color: #FEFEFE; } - input[type="reset"]:hover, input[type="reset"].selected, input[type="reset"].active, .btn-red:hover, .btn-red.selected, .btn-red.active { - box-shadow: 0 3px 0 #9e2423; } - input[type="reset"]:active, .btn-red:active { - box-shadow: 0 1px 0 #9e2423; } - -/* - -&[type="submit"], -&.gray-green { - @include fancy-btn-colors-full( - $btn-gray-f, $btn-gray-b, $btn-gray-l, - $btn-green-fa, $btn-green-ba, darken($btn-green-ba, 16) - ) -} - -&.gray-blue { - @include fancy-btn-colors-full( - $btn-gray-f, $btn-gray-b, $btn-gray-l, - $btn-blue-fa, $btn-blue-ba, darken($btn-blue-ba, 16) - ) -} - -&.gray-red { - @include fancy-btn-colors-full( - $btn-gray-f, $btn-gray-b, $btn-gray-l, - $btn-red-fa, $btn-red-ba, darken($btn-red-ba, 16) - ) -} - -&.gray-orange { - @include fancy-btn-colors-full( - $btn-gray-f, $btn-gray-b, $btn-gray-l, - $btn-orange-fa, $btn-orange-ba, darken($btn-orange-ba, 16) - ) -} - -// No change on hover - to be used for disabled buttons -&.gray-gray { - @include fancy-btn-colors-full( - $btn-gray-f, $btn-gray-b, $btn-gray-l, - $btn-gray-f, $btn-gray-b, $btn-gray-l - ) -} - -*/ -input[type="number"], input[type="password"], input[type="text"], textarea, select { - border: 0 none; - border-bottom: 2px solid #217b3a; - background-color: #303030; - color: white; - padding: 6px; - line-height: 1em; - outline: 0 none !important; - -moz-outline: 0 none !important; - font-weight: normal; } - input[type="number"]:focus, input[type="number"]:hover, input[type="password"]:focus, input[type="password"]:hover, input[type="text"]:focus, input[type="text"]:hover, textarea:focus, textarea:hover, select:focus, select:hover { - border-bottom-color: #28bc65; } - -input[type="number"], input[type="password"], input[type="text"], textarea { - -webkit-user-select: text; - -khtml-user-select: text; - -moz-user-select: text; - -ms-user-select: text; - user-select: text; - cursor: text; } - -textarea { - font-family: monospace; - line-height: 1.2em; - display: block; } - -@media screen and (-webkit-min-device-pixel-ratio: 0) { - select { - padding-right: 18px; } } - -select { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - cursor: pointer; - line-height: 1.4em; - padding: 3.5px; - padding-right: 1em; } - select:-moz-focusring { - color: transparent; - text-shadow: 0 0 0 white; } - select option { - background: #303030; } - -label.select-wrap { - position: relative; - display: inline !important; - margin: 0 !important; - padding: 0 !important; - width: auto !important; } - label.select-wrap:after { - content: '<>'; - /* will be rotated */ - font-family: "Consolas", monospace; - font-weight: bold; - color: #28bc65; - top: 50%; - -webkit-transform: translate(0, -50%) rotate(90deg); - transform: translate(0, -50%) rotate(90deg); - right: 2px; - position: absolute; - z-index: 100; - pointer-events: none; } - -form { - border: 0 none; - margin: 0; - padding: 0; - text-decoration: none; } - -input[type="number"], input[type="password"], input[type="text"], textarea, select, label.select-wrap { - width: 250px; } - -form .Row { - vertical-align: middle; - margin: 14px auto; - text-align: left; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; } - form .Row:first-child { - margin-top: 0; } - form .Row:last-child { - margin-bottom: 0; } - form .Row .spacer { - width: 130px; } - @media screen and (max-width: 544px) { - form .Row .spacer { - display: none; } } - form .Row.buttons input, form .Row.buttons .button { - margin-right: 0.6180469716rem; } - form .Row.centered { - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; } - form .Row.message { - font-size: 1em; - text-shadow: 1px 1px 3px black; - text-align: center; } - form .Row.message.error { - color: crimson; } - form .Row.message.ok { - color: #0fe851; } - form .Row.separator { - padding-top: 14px; - border-top: 2px solid rgba(255, 255, 255, 0.1); } - form .Row textarea { - display: inline-block; - vertical-align: top; - min-height: 10rem; - -webkit-box-flex: 1; - -webkit-flex-grow: 1; - -ms-flex-positive: 1; - flex-grow: 1; - resize: vertical; } - form .Row label { - font-weight: bold; - color: white; - display: inline-block; - width: 130px; - text-align: right; - text-shadow: 1px 1px 3px black; - padding: 8px; - -webkit-align-self: flex-start; - -ms-flex-item-align: start; - align-self: flex-start; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; } - form .Row .checkbox-wrap { - display: inline-block; - width: 130px; - padding: 8px; - text-align: right; - -webkit-align-self: flex-start; - -ms-flex-item-align: start; - align-self: flex-start; } - form .Row .checkbox-wrap input[type=checkbox] { - margin: auto; - width: auto; - height: auto; } - form .Row .checkbox-wrap + label { - width: 250px; - padding-left: 0; - text-align: left; - cursor: pointer; } - @media screen and (max-width: 544px) { - form .Row { - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; } - form .Row.buttons, form .Row.centered { - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; } - form .Row.buttons { - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; } - form .Row.buttons :last-child { - margin-right: 0; } - form .Row label { - padding-left: 0; - text-align: left; - width: auto; } - form .Row .checkbox-wrap { - -webkit-box-ordinal-group: 2; - -webkit-order: 1; - -ms-flex-order: 1; - order: 1; - text-align: left; - padding-bottom: 0; - border-radius: .4px; - width: auto; } - form .Row .checkbox-wrap + label { - width: auto; } - form .Row input[type="number"], form .Row input[type="password"], form .Row input[type="text"], form .Row textarea, form .Row textarea { - width: 100%; } } - -form span.required { - color: red; } - -.RadioGroup { - display: inline-block; - line-height: 1.5em; - vertical-align: middle; } - .RadioGroup label { - width: auto; - text-align: left; - cursor: pointer; - font-weight: normal; } - .RadioGroup input[type="radio"] { - vertical-align: middle; - margin: 0 0 0 5px; } - -@media screen and (-webkit-min-device-pixel-ratio: 0) { - select { - padding-right: 18px; } } - -select { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - cursor: pointer; - line-height: 1.4em; - padding: 3.5px; - padding-right: 1em; } - select:-moz-focusring { - color: transparent; - text-shadow: 0 0 0 white; } - select option { - background: #303030; } - -label.select-wrap { - position: relative; - display: inline !important; - margin: 0 !important; - padding: 0 !important; - width: auto !important; } - label.select-wrap:after { - content: '<>'; - /* will be rotated */ - font-family: "Consolas", monospace; - font-weight: bold; - color: #28bc65; - top: 50%; - -webkit-transform: translate(0, -50%) rotate(90deg); - transform: translate(0, -50%) rotate(90deg); - right: 2px; - position: absolute; - z-index: 100; - pointer-events: none; } - -#ap-list { - -webkit-column-count: 3; - -moz-column-count: 3; - column-count: 3; - -webkit-column-gap: 0; - -moz-column-gap: 0; - column-gap: 0; - margin: 0 -0.2360828548rem; } - @media screen and (min-width: 545px) and (max-width: 1000px) { - #ap-list { - -webkit-column-count: 2; - -moz-column-count: 2; - column-count: 2; } } - @media screen and (max-width: 544px) { - #ap-list { - -webkit-column-count: 1; - -moz-column-count: 1; - column-count: 1; } } - -#ap-loader { - background: rgba(255, 255, 255, 0.1); - border-radius: 5px; - padding: 0.3819820591rem; - margin-bottom: 0.3819820591rem; } - -#ap-box { - padding-bottom: 0.3819820591rem; } - -#psk-modal form { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - margin: 0.3819820591rem; } - #psk-modal form > * { - margin-left: 0.3819820591rem; - margin-right: 0.3819820591rem; } - #psk-modal form > *:first-child { - margin-left: 0; } - #psk-modal form > *:last-child { - margin-right: 0; } - #psk-modal form input[type=password] { - min-width: 5rem; } - -.AP { - -webkit-column-break-inside: avoid; - page-break-inside: avoid; - break-inside: avoid-column; - max-width: 500px; - padding: 0.2360828548rem; } - .AP.selected .inner { - background: #43de81 !important; - cursor: default; - top: 0 !important; } - .AP .inner { - cursor: pointer; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - position: relative; - border-radius: 3px; - color: #222; - background: #afafaf; - -webkit-transition: background-color 0.5s; - transition: background-color 0.5s; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; } - .AP .inner:active { - left: 0; - top: 1px; } - .AP .inner:hover { - background: white; } - .AP .inner > * { - padding: 0.6180469716rem; - white-space: nowrap; - word-wrap: normal; } - .AP .inner .rssi { - min-width: 2rem; - -webkit-box-flex: 0; - -webkit-flex: 0 0 15%; - -ms-flex: 0 0 15%; - flex: 0 0 15%; - text-align: right; } - .AP .inner .rssi:after { - padding-left: 0.090179415rem; - content: '%'; - font-size: 0.8888888889em; } - .AP .inner .essid { - -webkit-box-flex: 1; - -webkit-flex: 1 1 70%; - -ms-flex: 1 1 70%; - flex: 1 1 70%; - min-width: 0; - text-overflow: ellipsis; - overflow: hidden; - font-weight: bold; } - .AP .inner .auth { - -webkit-box-flex: 0; - -webkit-flex: 0 0 15%; - -ms-flex: 0 0 15%; - flex: 0 0 15%; } - -.page-home #rssi-perc:after { - padding-left: 0.1459102934rem; - content: '%'; - font-size: 0.8888888889em; } - -.page-home #rssi-dbm:after { - padding-left: 0.1459102934rem; - content: 'dBm'; - font-size: 0.8888888889em; } - -/*# sourceMappingURL=app.css.map */ +*,:after,:before{box-sizing:border-box}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}figure,nav{display:block}canvas,progress{display:inline-block;vertical-align:baseline}[hidden]{display:none}a{background-color:transparent}a:active,a:hover{outline:0}b{font-weight:700}h1,h2{font-size:2em;margin:.67em 0}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,pre{font-family:monospace;font-size:1em}button,input,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}legend{border:0;padding:0}textarea{overflow:auto}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.ct-axis-title,.ct-label{fill:hsla(0,0%,100%,.8)}.ct-label{color:hsla(0,0%,100%,.8);font-size:.75rem;line-height:1}.ct-label.ct-horizontal.ct-start{align-items:flex-end;justify-content:flex-start;text-align:left;text-anchor:start}.ct-label.ct-horizontal.ct-end{align-items:flex-start;justify-content:flex-start;text-align:left;text-anchor:start;transform:translate(-4px) rotate(45deg)}.ct-label.ct-vertical.ct-start{align-items:flex-end;justify-content:flex-end;text-align:right;text-anchor:end;transform:translateY(20%)}.ct-label.ct-vertical.ct-end{align-items:flex-end;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar .ct-label,.ct-chart-line .ct-label{display:flex}.ct-chart-bar .ct-label.ct-horizontal.ct-start{align-items:flex-end;justify-content:center;text-align:center;text-anchor:start}.ct-chart-bar .ct-label.ct-horizontal.ct-end{align-items:flex-start;justify-content:center;text-align:center;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-start{align-items:flex-end;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-end{align-items:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-start{align-items:center;justify-content:flex-end;text-align:right;text-anchor:end}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-end{align-items:center;justify-content:flex-start;text-align:left;text-anchor:end}.ct-grid{stroke:hsla(0,0%,100%,.3);stroke-width:1px;stroke-dasharray:2px}.ct-point{stroke-width:4px;stroke-linecap:round}.ct-line{fill:none;stroke-width:2px}.ct-area{stroke:none;fill-opacity:.1}.ct-bar{fill:none;stroke-width:10px}.ct-series-a .ct-bar,.ct-series-a .ct-line,.ct-series-a .ct-point{stroke:#f05b4f}.ct-series-a .ct-area,.ct-series-a .ct-slice-pie{fill:#f05b4f}.ct-series-b .ct-bar,.ct-series-b .ct-line,.ct-series-b .ct-point{stroke:#6188e2}.ct-series-b .ct-area,.ct-series-b .ct-slice-pie{fill:#6188e2}.ct-series-c .ct-bar,.ct-series-c .ct-line,.ct-series-c .ct-point{stroke:#59922b}.ct-series-c .ct-area,.ct-series-c .ct-slice-pie{fill:#59922b}.ct-series-d .ct-bar,.ct-series-d .ct-line,.ct-series-d .ct-point{stroke:#eacf7d}.ct-series-d .ct-area,.ct-series-d .ct-slice-pie{fill:#eacf7d}.ct-series-e .ct-bar,.ct-series-e .ct-line,.ct-series-e .ct-point{stroke:#a748ca}.ct-series-e .ct-area,.ct-series-e .ct-slice-pie{fill:#a748ca}.ct-wide{display:block;position:relative;width:100%}.ct-wide:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:56.25%}.ct-wide:after{content:"";display:table;clear:both}.ct-wide>svg{display:block;position:absolute;top:0;left:0}.ct-narrow{display:block;position:relative;width:100%}.ct-narrow:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:66.6666666667%}.ct-narrow:after{content:"";display:table;clear:both}.ct-narrow>svg{display:block;position:absolute;top:0;left:0}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}.center{text-align:center}html{font-family:Arial,sans-serif;color:#d0d0d0;background:#131315}body,html{border:0 none;margin:0;padding:0;text-decoration:none;width:100%;height:100%;overflow:hidden}a,a:link,a:visited{color:#5abfff;text-decoration:none}a:hover{color:#5abfff;text-decoration:underline}#outer{display:flex;position:absolute;width:100%;height:100%;left:0;right:0;top:0;bottom:0;overflow:hidden;flex-direction:row}@media screen and (max-width:544px){#outer{display:block;overflow-y:scroll}}#menu{flex:0 0 15rem;background:#2bab5f}#menu>*{display:block;text-decoration:none;padding:.6180469716rem 1rem;white-space:nowrap;word-wrap:normal;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#menu #brand{color:#fff;background:#218248;font-size:120%;text-align:center;position:relative;margin-bottom:1rem}@media screen and (max-width:544px){#menu #brand{background:#2bab5f;cursor:pointer}#menu #brand:after{position:absolute;color:rgba(0,0,0,.2);right:1rem;content:'>';top:50%;font-size:120%;font-weight:700;transform:translateY(-50%) rotate(90deg)}}#menu.expanded #brand{background:#218248}@media screen and (max-width:544px){#menu.expanded #brand:after{transform:translateY(-50%) rotate(-90deg)}}#menu a{font-size:130%;color:#fff;transition:background-color .2s;text-shadow:0 0 5px rgba(0,0,0,.4)}#menu a.selected,#menu a:hover{background:#1bd886;text-shadow:0 0 5px rgba(0,0,0,.6)}#menu a.selected{position:relative;box-shadow:0 0 5px rgba(0,0,0,.5)}#menu a:before{content:"▸";padding-right:.5rem;position:relative;top:-.1rem}@media screen and (max-width:544px){#menu a{display:none}}#menu.expanded a{display:block}@media screen and (min-width:545px) and (max-width:1000px){#menu{flex-basis:10rem}#menu #brand{font-size:95%;margin-bottom:.6180469716rem}#menu a{font-size:105%}#menu>*{padding:.3819820591rem .6180469716rem}}#content{flex-grow:1;overflow-y:auto;padding:1rem}@media screen and (max-width:544px){#content{padding:.6180469716rem}}#content>*{margin-left:auto;margin-right:auto}#content h1{text-align:center;font-size:2.2806973457em;margin-top:0;margin-bottom:1rem}#content h2{font-size:1.423828125em;margin-bottom:.6180469716rem}#content td,#content th{padding:.3819820591rem}#content tbody th{text-align:right;width:130px;color:#fff}.Box{display:block;max-width:900px;margin-top:1rem;padding:.6180469716rem;border-radius:3px;background-color:hsla(0,0%,100%,.07)}@media screen and (max-width:544px){.Box{margin-top:.6180469716rem}}.Box h2,h1+.Box{margin-top:0}.Box.wide{width:initial;max-width:initial}.Box.medium{max-width:1200px}.Modal{position:fixed;width:100%;height:100%;left:0;top:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center;transition:opacity .5s;background:rgba(0,0,0,.65);opacity:0}.Modal.visible{opacity:1}.Modal.hidden{display:none}.Dialog{margin:.6180469716rem;padding:1rem .6180469716rem;overflow:hidden;max-width:100%;max-height:100%;flex:0 1 30rem;background:#1c1c1e;border-left:6px solid #217b3a;border-right:6px solid #217b3a;box-shadow:0 0 2px 0 #434349,0 0 6px 0 #000;border-radius:6px}.button,button,input[type=button],input[type=reset],input[type=submit]{text-align:center;cursor:pointer;display:inline-block;border-radius:2px;padding:0 .6em;border:0 none;outline:0 none!important;line-height:1.8em;font-size:1.1em;margin-bottom:3px;min-width:5em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-shadow:1.5px 1.5px 2px rgba(0,0,0,.8)}.button:active,button:active,input[type=button]:active,input[type=reset]:active,input[type=submit]:active{position:relative;top:2px}.button.narrow,button.narrow,input[type=button].narrow,input[type=reset].narrow,input[type=submit].narrow{min-width:initial}.btn-green,input[type=submit]{background-color:#2ca94b;box-shadow:0 3px 0 #1d7032;text-decoration:none!important}.btn-green,.btn-green:link,.btn-green:visited,input[type=submit],input[type=submit]:link,input[type=submit]:visited{color:#fefefe}.btn-green.active,.btn-green.selected,.btn-green:active,.btn-green:hover,input[type=submit].active,input[type=submit].selected,input[type=submit]:active,input[type=submit]:hover{background-color:#28ba5c;color:#fefefe}.btn-green.active,.btn-green.selected,.btn-green:hover,input[type=submit].active,input[type=submit].selected,input[type=submit]:hover{box-shadow:0 3px 0 #1a773b}.btn-green:active,input[type=submit]:active{box-shadow:0 1px 0 #1a773b}.btn-red,input[type=reset]{background-color:#d04e51;box-shadow:0 3px 0 #aa2d30;text-decoration:none!important}.btn-red,.btn-red:link,.btn-red:visited,input[type=reset],input[type=reset]:link,input[type=reset]:visited{color:#fefefe}.btn-red.active,.btn-red.selected,.btn-red:active,.btn-red:hover,input[type=reset].active,input[type=reset].selected,input[type=reset]:active,input[type=reset]:hover{background-color:#d4403f;color:#fefefe}.btn-red.active,.btn-red.selected,.btn-red:hover,input[type=reset].active,input[type=reset].selected,input[type=reset]:hover{box-shadow:0 3px 0 #9e2423}.btn-red:active,input[type=reset]:active{box-shadow:0 1px 0 #9e2423}input[type=number],input[type=password],input[type=text],select,textarea{border:0 none;border-bottom:2px solid #217b3a;background-color:#303030;color:#fff;padding:6px;line-height:1em;outline:0 none!important;-moz-outline:0 none!important;font-weight:400}input[type=number]:focus,input[type=number]:hover,input[type=password]:focus,input[type=password]:hover,input[type=text]:focus,input[type=text]:hover,select:focus,select:hover,textarea:focus,textarea:hover{border-bottom-color:#28bc65}input[type=number],input[type=password],input[type=text],textarea{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;cursor:text}textarea{font-family:monospace;line-height:1.2em;display:block}form{border:0 none;margin:0;padding:0;text-decoration:none}input[type=number],input[type=password],input[type=text],label.select-wrap,select,textarea{width:250px}form .Row{vertical-align:middle;margin:14px auto;text-align:left;display:flex;flex-direction:row}form .Row:first-child{margin-top:0}form .Row:last-child{margin-bottom:0}form .Row .spacer{width:130px}@media screen and (max-width:544px){form .Row .spacer{display:none}}form .Row.buttons .button,form .Row.buttons input{margin-right:.6180469716rem}form .Row.centered{justify-content:center}form .Row.message{font-size:1em;text-shadow:1px 1px 3px #000;text-align:center}form .Row.message.error{color:crimson}form .Row.message.ok{color:#0fe851}form .Row.separator{padding-top:14px;border-top:2px solid hsla(0,0%,100%,.1)}form .Row textarea{display:inline-block;vertical-align:top;min-height:10rem;flex-grow:1;resize:vertical}form .Row label{font-weight:700;color:#fff;text-shadow:1px 1px 3px #000;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}form .Row .checkbox-wrap,form .Row label{display:inline-block;width:130px;text-align:right;padding:8px;align-self:flex-start}form .Row .checkbox-wrap input[type=checkbox]{margin:auto;width:auto;height:auto}form .Row .checkbox-wrap+label{width:250px;padding-left:0;text-align:left;cursor:pointer}@media screen and (max-width:544px){form .Row{flex-direction:column}form .Row.buttons,form .Row.centered{flex-direction:row}form .Row.buttons{justify-content:center}form .Row.buttons :last-child{margin-right:0}form .Row label{padding-left:0;text-align:left;width:auto}form .Row .checkbox-wrap{order:1;text-align:left;padding-bottom:0;border-radius:.4px;width:auto}form .Row .checkbox-wrap+label{width:auto}form .Row input[type=number],form .Row input[type=password],form .Row input[type=text],form .Row textarea{width:100%}}form span.required{color:red}.RadioGroup{display:inline-block;line-height:1.5em;vertical-align:middle}.RadioGroup label{width:auto;text-align:left;cursor:pointer;font-weight:400}.RadioGroup input[type=radio]{vertical-align:middle;margin:0 0 0 5px}@media screen and (-webkit-min-device-pixel-ratio:0){select{padding-right:18px}}select{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;line-height:1.4em;padding:3.5px;padding-right:1em}select:-moz-focusring{color:transparent;text-shadow:0 0 0 #fff}select option{background:#303030}label.select-wrap{position:relative;display:inline!important;margin:0!important;padding:0!important;width:auto!important}label.select-wrap:after{content:'<>';font-family:Consolas,monospace;font-weight:700;color:#28bc65;top:50%;transform:translateY(-50%) rotate(90deg);right:2px;position:absolute;z-index:100;pointer-events:none}#ap-list{-webkit-column-count:3;-moz-column-count:3;column-count:3;-webkit-column-gap:0;-moz-column-gap:0;column-gap:0;margin:0 -.2360828548rem}@media screen and (min-width:545px) and (max-width:1000px){#ap-list{-webkit-column-count:2;-moz-column-count:2;column-count:2}}@media screen and (max-width:544px){#ap-list{-webkit-column-count:1;-moz-column-count:1;column-count:1}}#ap-loader{background:hsla(0,0%,100%,.1);border-radius:5px;padding:.3819820591rem;margin-bottom:.3819820591rem}#ap-box{padding-bottom:.3819820591rem}#psk-modal form{display:flex;align-items:center;margin:.3819820591rem}#psk-modal form>*{margin-left:.3819820591rem;margin-right:.3819820591rem}#psk-modal form>:first-child{margin-left:0}#psk-modal form>:last-child{margin-right:0}#psk-modal form input[type=password]{min-width:5rem}.AP{-webkit-column-break-inside:avoid;page-break-inside:avoid;break-inside:avoid-column;max-width:500px;padding:.2360828548rem}.AP.selected .inner{background:#43de81!important;cursor:default;top:0!important}.AP .inner{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;border-radius:3px;color:#222;background:#afafaf;transition:background-color .5s;display:flex}.AP .inner:active{left:0;top:1px}.AP .inner:hover{background:#fff}.AP .inner>*{padding:.6180469716rem;white-space:nowrap;word-wrap:normal}.AP .inner .rssi{min-width:2rem;flex:0 0 15%;text-align:right}.AP .inner .rssi:after{padding-left:.090179415rem;content:'%';font-size:.8888888889em}.AP .inner .essid{flex:1 1 70%;min-width:0;text-overflow:ellipsis;overflow:hidden;font-weight:700}.AP .inner .auth{flex:0 0 15%}.page-home #rssi-perc:after{padding-left:.1459102934rem;content:'%';font-size:.8888888889em}.page-home #rssi-dbm:after{padding-left:.1459102934rem;content:'dBm';font-size:.8888888889em} \ No newline at end of file diff --git a/html/js/all.js b/html/js/all.js index 9a95112..e81136c 100644 --- a/html/js/all.js +++ b/html/js/all.js @@ -1,959 +1,2 @@ -function bool(x) { - return (x === 1 || x === '1' || x === true || x === 'true'); -} - -/** html entities */ -function e(x) { - return String(x) - .replace(/&/g, '&') - .replace(/"/g, '"') - .replace(/'/g, ''') - .replace(//g, '>'); -} - -/** Returns true if argument is array [] */ -function isArray(obj) { - return Object.prototype.toString.call(obj) === '[object Array]'; -} - -/** Returns true if argument is object {} */ -function isObject(obj) { - return Object.prototype.toString.call(obj) === '[object Object]'; -} - -/** escape a string to have no special meaning in regex */ -function regexEscape(s) { - return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); -} - -/** Convert RSSI 0-255 to % */ -function rssiPerc(rssi) { - var r = parseInt(rssi); - if (r > -50) return 100; // 100% - if (r < -100) return 0; // 0% - return Math.round(2 * (r + 100)); // approximation -} - -/** Perform a substitution in the given string. - * - * Arguments - array or list of replacements. - * Arguments numeric keys will replace {0}, {1} etc. - * Named keys also work, ie. {foo: "bar"} -> replaces {foo} with bar. - * - * Braces are added to keys if missing. - * - * @returns {String} result - */ -String.prototype.format = function () { - var out = this; - - var repl = arguments; - - if (arguments.length == 1 && (isArray(arguments[0]) || isObject(arguments[0]))) { - repl = arguments[0]; - } - - for (var ph in repl) { - if (repl.hasOwnProperty(ph)) { - var ph_orig = ph; - - if (!ph.match(/^\{.*\}$/)) { - ph = '{' + ph + '}'; - } - - // replace all occurrences - var pattern = new RegExp(regexEscape(ph), "g"); - out = out.replace(pattern, repl[ph_orig]); - } - } - - return out; -}; - -/** Module for toggling a modal overlay */ -var modal = (function () { - var modal = {}; - - modal.show = function (sel) { - var $m = $(sel); - $m.removeClass('hidden visible'); - setTimeout(function () { - $m.addClass('visible'); - }, 1); - }; - - modal.hide = function (sel) { - var $m = $(sel); - $m.removeClass('visible'); - setTimeout(function () { - $m.addClass('hidden'); - }, 500); // transition time - }; - - modal.init = function () { - // close modal by click outside the dialog - $('.Modal').on('click', function () { - modal.hide(this); - }); - - $('.Dialog').on('click', function (e) { - e.stopImmediatePropagation(); - }); - - // Hide all modals on esc - $(window).on('keydown', function (e) { - if (e.which == 27) { - modal.hide('.Modal'); - } - }); - }; - - return modal; -})(); - - -/** Wifi page */ -var wifi = (function () { - var wifi = {}; - var authStr = ['Open', 'WEP', 'WPA', 'WPA2', 'WPA/WPA2']; - - /** Update display for received response */ - function onScan(resp, status) { - if (status != 200) { - // bad response - rescan(5000); // wait 5sm then retry - return; - } - - resp = JSON.parse(resp); - - var done = !bool(resp.result.inProgress) && (resp.result.APs.length > 0); - rescan(done ? 15000 : 1000); - if (!done) return; // no redraw yet - - // clear the AP list - var $list = $('#ap-list'); - // remove old APs - $('.AP').remove(); - - $list.toggle(done); - $('#ap-loader').toggle(!done); - - // scan done - resp.result.APs - .sort(function (a, b) { - return b.rssi - a.rssi - }) - .forEach(function (ap) { - ap.enc = parseInt(ap.enc); - - if (ap.enc > 4) return; // hide unsupported auths - - var item = document.createElement('div'); - - var $item = $(item) - .data('ssid', ap.essid) - .data('pwd', ap.enc != 0) - .addClass('AP'); - - // mark current SSID - if (ap.essid == wifi.current) { - $item.addClass('selected'); - } - - var inner = document.createElement('div'); - var $inner = $(inner).addClass('inner') - .htmlAppend('
diff --git a/html/pages/wfm.html b/html/pages/wfm.html new file mode 100644 index 0000000..627d44b --- /dev/null +++ b/html/pages/wfm.html @@ -0,0 +1,41 @@ + + +
+ + + + +
+ + + + + + +
+