wifi sta picker improvements and better transl

pull/30/head
Ondřej Hruška 8 years ago
parent 812feebf54
commit 3f09cc3601
  1. 16
      html_orig/css/app.css
  2. 2
      html_orig/lang/en.php
  3. 11
      html_orig/pages/cfg_wifi.php
  4. 10
      html_orig/sass/layout/_box.scss
  5. 2
      html_orig/sass/pages/_wifi.scss

@ -504,15 +504,17 @@ ul > * {
max-width: 1200px; } max-width: 1200px; }
.Box.str { .Box.str {
position: relative; } position: relative; }
.Box.str .Row.mq-phone { .Box.str .Row.buttons {
position: absolute; position: absolute; }
@media screen and (max-width: 544px) {
.Box.str .Row.buttons {
right: 1rem; right: 1rem;
margin: 1rem auto; } margin: 1rem auto; } }
.Box.str .Row.mq-no-phone { @media screen and (min-width: 545px) {
position: absolute; .Box.str .Row.buttons {
right: 0; right: 0;
top: 0; top: 0;
margin-top: 0.61805rem; } margin-top: 0.61805rem; } }
@media screen and (max-width: 544px) { @media screen and (max-width: 544px) {
.Box.mobcol h2 { .Box.mobcol h2 {
@ -956,7 +958,7 @@ form span.required {
.AP-preview .wrap .forget:active { .AP-preview .wrap .forget:active {
position: relative; position: relative;
padding-top: calc(0.61805rem + 1px); } padding-top: calc(0.61805rem + 1px); }
.AP-preview .wrap .essid, .AP-preview .wrap .passwd { .AP-preview .wrap .essid, .AP-preview .wrap .passwd, .AP-preview .wrap .nopasswd {
padding-bottom: 0; } padding-bottom: 0; }
.AP-preview .wrap .x-passwd { .AP-preview .wrap .x-passwd {
font-family: monospace; } font-family: monospace; }

@ -27,6 +27,8 @@ return [
'wifi.not_conn' => 'Not connected.', 'wifi.not_conn' => 'Not connected.',
'wifi.sta_none' => 'None', 'wifi.sta_none' => 'None',
'wifi.sta_active_pw' => '🔒', 'wifi.sta_active_pw' => '🔒',
'wifi.sta_active_nopw' => '🔓 Open access',
'wifi.connected_ip_is' => 'Connected, IP is ',
'wifi.submit' => 'Apply!', 'wifi.submit' => 'Apply!',
'wifi.scanning' => 'Scanning', 'wifi.scanning' => 'Scanning',

@ -73,6 +73,7 @@
<div class="inner"> <div class="inner">
<div class="essid"></div> <div class="essid"></div>
<div class="passwd"><?= tr('wifi.sta_active_pw') ?>&nbsp;<span class="x-passwd"></span></div> <div class="passwd"><?= tr('wifi.sta_active_pw') ?>&nbsp;<span class="x-passwd"></span></div>
<div class="nopasswd"><?= tr('wifi.sta_active_nopw') ?></div>
<div class="ip"></div> <div class="ip"></div>
</div> </div>
<a class="forget" id="forget-sta">×</a> <a class="forget" id="forget-sta">×</a>
@ -141,7 +142,8 @@
var nopw = undef(password) || password.length == 0; var nopw = undef(password) || password.length == 0;
$('#sta-nw .x-passwd').html(e(password)); $('#sta-nw .x-passwd').html(e(password));
$('#sta-nw .passwd').toggleClass('hidden', nopw); $('#sta-nw .passwd').toggleClass('hidden', nopw);
$('#sta-nw .ip').html(ip.length>0 ? 'IP = '+ip : '<?=tr('wifi.not_conn')?>'); $('#sta-nw .nopasswd').toggleClass('hidden', !nopw);
$('#sta-nw .ip').html(ip.length>0 ? '<?=tr('wifi.connected_ip_is')?>'+ip : '<?=tr('wifi.not_conn')?>');
} }
selectSta('%sta_ssid%', '%sta_password%', '%sta_active_ip%'); selectSta('%sta_ssid%', '%sta_password%', '%sta_active_ip%');
@ -149,12 +151,15 @@
var authStr = ['Open', 'WEP', 'WPA', 'WPA2', 'WPA/WPA2']; var authStr = ['Open', 'WEP', 'WPA', 'WPA2', 'WPA/WPA2'];
var curSSID = '%sta_active_ssid%'; var curSSID = '%sta_active_ssid%';
function submitPskModal(e) { function submitPskModal(e, open) {
var passwd = $('#conn-passwd').val(); var passwd = $('#conn-passwd').val();
var ssid = $('#conn-ssid').val(); var ssid = $('#conn-ssid').val();
if (open || passwd.length) {
$('#sta_password').val(passwd); $('#sta_password').val(passwd);
$('#sta_ssid').val(ssid); $('#sta_ssid').val(ssid);
selectSta(ssid, passwd, ''); selectSta(ssid, passwd, '');
}
if (e) e.preventDefault(); if (e) e.preventDefault();
Modal.hide('#psk-modal'); Modal.hide('#psk-modal');
@ -229,7 +234,7 @@
$('#conn-passwd')[0].focus(); $('#conn-passwd')[0].focus();
} else { } else {
//Modal.show('#reset-modal'); //Modal.show('#reset-modal');
submitPskModal(); submitPskModal(null, true);
} }
}); });

@ -34,21 +34,25 @@
// min-width: 10em; // min-width: 10em;
//} //}
// Submit Top Right
&.str { &.str {
position: relative; position: relative;
.Row.mq-phone { .Row.buttons {
position: absolute; position: absolute;
@include media($phone) {
right: dist(0); right: dist(0);
margin: 1rem auto; margin: 1rem auto;
} }
.Row.mq-no-phone {
position: absolute; @include media($tablet-min) {
right: 0; right: 0;
top: 0; top: 0;
margin-top: dist(-1); margin-top: dist(-1);
} }
} }
} }
}
@include media($phone) { @include media($phone) {
.Box.mobcol { .Box.mobcol {

@ -173,7 +173,7 @@
} }
} }
.essid, .passwd { .essid, .passwd, .nopasswd {
padding-bottom: 0; padding-bottom: 0;
} }

Loading…
Cancel
Save