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

password toggle #38

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

s-katte
Copy link
Member

@s-katte s-katte commented Oct 1, 2020

solves #19

Copy link
Member

@VaibhavSaini19 VaibhavSaini19 left a comment

Choose a reason for hiding this comment

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

@s-katte

  • I think you created a branch from master and made changes in that. As asked by @t0xic0der , the desired changes are to be made in modern-layout branch. Also, remove unnecessary indentation in the code that you modified.
  • The JS you added was not inside <script> tags, so it wouldn't work anyway.
  • If @t0xic0der approves, you can also toggle the icons easily with the following code, assuming you call this function on icon click, instead of creating 2 separate functions:
function toggle(){
    let isTypePwd = document.getElementById("pwd").type == "password";
    document.getElementById("pwd").type = isTypePwd ? "text" : "password";
    document.getElementById("eyeSlash").style.display = isTypePwd ? "block" : "none";
    document.getElementById("eye").style.display = isTypePwd ? "none" : "block";
  }

@s-katte
Copy link
Member Author

s-katte commented Oct 7, 2020

sure, I will do the it.

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.

2 participants