wifi sta picker improvements and better transl

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

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

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

@ -73,6 +73,7 @@
<div class="inner">
<div class="essid"></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>
<a class="forget" id="forget-sta">×</a>
@ -141,7 +142,8 @@
var nopw = undef(password) || password.length == 0;
$('#sta-nw .x-passwd').html(e(password));
$('#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%');
@ -149,12 +151,15 @@
var authStr = ['Open', 'WEP', 'WPA', 'WPA2', 'WPA/WPA2'];
var curSSID = '%sta_active_ssid%';
function submitPskModal(e) {
function submitPskModal(e, open) {
var passwd = $('#conn-passwd').val();
var ssid = $('#conn-ssid').val();
$('#sta_password').val(passwd);
$('#sta_ssid').val(ssid);
selectSta(ssid, passwd, '');
if (open || passwd.length) {
$('#sta_password').val(passwd);
$('#sta_ssid').val(ssid);
selectSta(ssid, passwd, '');
}
if (e) e.preventDefault();
Modal.hide('#psk-modal');
@ -229,7 +234,7 @@
$('#conn-passwd')[0].focus();
} else {
//Modal.show('#reset-modal');
submitPskModal();
submitPskModal(null, true);
}
});

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

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

Loading…
Cancel
Save