Skip to content

Added password security level with a bar.#182

Open
Shagufta08 wants to merge 1 commit intoKamandPrompt:masterfrom
Shagufta08:shagufta
Open

Added password security level with a bar.#182
Shagufta08 wants to merge 1 commit intoKamandPrompt:masterfrom
Shagufta08:shagufta

Conversation

@Shagufta08
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread views/partials/header.ejs

<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
Copy Markdown
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
Copy Markdown
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