Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added password security level with a bar. #182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Shagufta08
Copy link

Added 2 files,i.e. passwordindicator.css ,passwordindicator.js, and made changes in header.ejs

Issue #81
[add password security level]

Fixes: #81

                                                       BEFORE

sign up-before

                                                        AFTER

after1

after2

add password security level
Copy link
Member

@Signior-X Signior-X left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work done, the feature was working good and it's great!

Just you need to better format the code, which I think the editor you are using will help!

display: flex;
position: relative;
}
form .password-wrapper .password{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, it will be better if you add a single line after the ending of each css block

@@ -0,0 +1,59 @@
const indicator = document.querySelector(".indicator");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a better name for classes so that it doesn't conflict with some other variables in future.

like instead of indicator use pass-security-indicator

if(input.value != ""){
indicator.style.display = "block";
indicator.style.display = "flex";
if(input.value.length <= 3 && (input.value.match(regExpWeak) || input.value.match(regExpMedium) || input.value.match(regExpStrong)))no=1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this code a bit better readable, like you can do one thing.
If you are using VScode, simply select the whole filea and right click and format it.

It would be better with some spaces and line breaks

input.type = "text";
showBtn.textContent = "HIDE";
showBtn.style.color = "#23ad5c";
}else{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, proper formatting is just needed.
Right-click and format the file, so there is a consistency in spacing and tabs.


<div class="password-wrapper">
<label for="inputPasswordSignUp" class="sr-only">Password</label>
<input class="form-control password" type="password" onkeyup="trigger()" name="password" id="inputPasswordSignUp" placeholder="Password" required>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@Shagufta08
Copy link
Author

Thanks!
I will make the code more readable and do all the changes that are requested by you as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add password security level.
2 participants