mirror of
https://github.com/unraid/webgui.git
synced 2026-01-27 12:09:06 -06:00
Users: Display Password Strength (take 2½)
This commit is contained in:
@@ -18,6 +18,7 @@ Tag="user"
|
||||
<?
|
||||
$void = "<img src='/webGui/images/user.png' width='48' height='48' onclick='$("#drop").click()' style='cursor:pointer' title='Click to select PNG file'>";
|
||||
$icon = "<i class='fa fa-trash top' title='Restore default image' onclick='restore()'></i>";
|
||||
$zxcvbn = file_exists('/boot/config/plugins/dynamix/zxcvbn.js');
|
||||
?>
|
||||
|
||||
<style>
|
||||
@@ -37,7 +38,9 @@ i#showPass.checked{opacity:0.5}
|
||||
|
||||
<script src="<?autov('/webGui/javascript/jquery.filedrop.js')?>"></script>
|
||||
<script src="<?autov('/webGui/javascript/jquery.base64.js')?>"></script>
|
||||
<script src="<?autov('/webGui/javascript/jquery.zxcvbn.js')?>" async></script>
|
||||
<?if ($zxcvbn):?>
|
||||
<script src="<?autov('/boot/config/plugins/dynamix/zxcvbn.js')?>" async></script>
|
||||
<?endif;?>
|
||||
<script>
|
||||
var path = '/boot/config/plugins/dynamix/users';
|
||||
var filename = '';
|
||||
@@ -79,6 +82,7 @@ function checkUsername(form) {
|
||||
}
|
||||
|
||||
function validatePassword(input) {
|
||||
<?if ($zxcvbn):?>
|
||||
var custom = ['unraid','limetech','lime-technology','bergware','squidly'];
|
||||
var strength = ['Worst','Bad','Weak','Good','Strong'];
|
||||
var emoji = ['😵','😩','😔','😀','😎'];
|
||||
@@ -99,6 +103,7 @@ function validatePassword(input) {
|
||||
$('#strength-text').html(emoji[bar.score]+' '+strength[bar.score]+'. '+bar.feedback.warning);
|
||||
$('.usage-disk.sys').removeClass('none');
|
||||
}
|
||||
<?endif;?>
|
||||
}
|
||||
|
||||
function restore() {
|
||||
|
||||
@@ -25,6 +25,7 @@ Tag="user"
|
||||
$user = "/boot/config/plugins/dynamix/users/$name.png";
|
||||
$void = "<img src='/webGui/images/user.png' width='48' height='48' id='image' onclick='$("#drop").click()' style='cursor:pointer' title='Click to select PNG file'>";
|
||||
$icon = "<i class='fa fa-trash top' title='Restore default image' onclick='restore()'></i>";
|
||||
$zxcvbn = file_exists('/boot/config/plugins/dynamix/zxcvbn.js');
|
||||
?>
|
||||
|
||||
<style>
|
||||
@@ -44,7 +45,9 @@ i#showPass.checked{opacity:0.5}
|
||||
|
||||
<script src="<?autov('/webGui/javascript/jquery.filedrop.js')?>"></script>
|
||||
<script src="<?autov('/webGui/javascript/jquery.base64.js')?>"></script>
|
||||
<script src="<?autov('/webGui/javascript/jquery.zxcvbn.js')?>" async></script>
|
||||
<?if ($zxcvbn):?>
|
||||
<script src="<?autov('/boot/config/plugins/dynamix/zxcvbn.js')?>" async></script>
|
||||
<?endif;?>
|
||||
<script>
|
||||
var path = '/boot/config/plugins/dynamix/users';
|
||||
var filename = '';
|
||||
@@ -74,6 +77,7 @@ function checkPassword(form) {
|
||||
}
|
||||
|
||||
function validatePassword(input) {
|
||||
<?if ($zxcvbn):?>
|
||||
var custom = ['unraid','limetech','lime-technology','bergware','squidly'];
|
||||
var strength = ['Worst','Bad','Weak','Good','Strong'];
|
||||
var emoji = ['😵','😩','😔','😀','😎'];
|
||||
@@ -94,6 +98,7 @@ function validatePassword(input) {
|
||||
$('#strength-text').html(emoji[bar.score]+' '+strength[bar.score]+'. '+bar.feedback.warning);
|
||||
$('.usage-disk.sys').removeClass('none');
|
||||
}
|
||||
<?endif;?>
|
||||
}
|
||||
|
||||
function restore() {
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user