1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Update w/ getSignalBars, hide/show passphrase glyphs

This commit is contained in:
billz 2023-03-24 12:04:34 +01:00
parent 162dbf74e0
commit dbc0d0d65f

View File

@ -4,7 +4,7 @@
<?php if (strlen($network['ssid']) == 0) { <?php if (strlen($network['ssid']) == 0) {
$network['ssid'] = "(unknown)"; $network['ssid'] = "(unknown)";
} ?> } ?>
<h5 class="card-title"><?php echo htmlspecialchars($network['ssidutf8'], ENT_QUOTES); ?></h5> <h5 class="card-title"><i class="fas fa-wifi mr-2"></i><?php echo htmlspecialchars($network['ssidutf8'], ENT_QUOTES); ?></h5>
<div class="info-item-wifi"><?php echo _("Status"); ?></div> <div class="info-item-wifi"><?php echo _("Status"); ?></div>
<div> <div>
<?php if ($network['configured']) { ?> <?php if ($network['configured']) { ?>
@ -29,21 +29,14 @@
<div class="info-item-wifi"><?php echo _("RSSI"); ?></div> <div class="info-item-wifi"><?php echo _("RSSI"); ?></div>
<div> <div>
<?php <?php if (isset($network['RSSI']) && $network['RSSI'] >= -200) {
if (isset($network['RSSI']) && $network['RSSI'] >= -200) { echo '<div class="d-flex justify-content-start">';
echo htmlspecialchars($network['RSSI'], ENT_QUOTES); echo getSignalBars($network['RSSI']);
echo "dB ("; echo '<div class="ml-2">' .htmlspecialchars($network['RSSI'], ENT_QUOTES) . "dB" . "</div>";
if ($network['RSSI'] >= -50) { echo '</div>';
echo 100;
} elseif ($network['RSSI'] <= -100) {
echo 0;
} else {
echo 2*($network['RSSI'] + 100);
}
echo "%)";
} else { } else {
echo " not found "; echo " not found ";
} }
?> ?>
</div> </div>
@ -52,8 +45,8 @@
<?php } ?> <?php } ?>
<input type="hidden" name="protocol<?php echo $index ?>" value="<?php echo htmlspecialchars($network['protocol'], ENT_QUOTES); ?>" /> <input type="hidden" name="protocol<?php echo $index ?>" value="<?php echo htmlspecialchars($network['protocol'], ENT_QUOTES); ?>" />
<div class="info-item-wifi"><?php echo _("Security"); ?></div> <div class="info-item-wifi"><?php echo _("Security"); ?></div>
<div><?php echo empty($network['protocol']) ? "-" : $network['protocol'] ?></div> <div><?php echo empty($network['protocol']) ? "-" : $network['protocol'] ?></div>
<div class="form-group"> <div class="form-group">
<div class="info-item-wifi"><?php echo _("Passphrase"); ?></div> <div class="info-item-wifi"><?php echo _("Passphrase"); ?></div>
@ -63,7 +56,7 @@
<?php } else { ?> <?php } else { ?>
<input type="password" class="form-control" aria-describedby="passphrase" name="passphrase<?php echo $index ?>" value="<?php echo $network['passphrase'] ?>" data-target="#update<?php echo $index ?>" data-colors="#ffd0d0,#d0ffd0"> <input type="password" class="form-control" aria-describedby="passphrase" name="passphrase<?php echo $index ?>" value="<?php echo $network['passphrase'] ?>" data-target="#update<?php echo $index ?>" data-colors="#ffd0d0,#d0ffd0">
<div class="input-group-append"> <div class="input-group-append">
<button class="btn btn-outline-secondary js-toggle-password" type="button" data-target="[name=passphrase<?php echo $index ?>]" data-toggle-with="<?php echo _("Hide") ?>">Show</button> <button class="btn btn-outline-secondary js-toggle-password" type="button" data-target="[name=passphrase<?php echo $index ?>]" data-toggle-with="fas fa-eye-slash"><i class="fas fa-eye mx-2"></i></button>
</div> </div>
<?php } ?> <?php } ?>
</div> </div>