Fix #935 - Add password visibility toggle to authentication modals#938
Open
MohitSoni2021 wants to merge 1 commit into
Open
Fix #935 - Add password visibility toggle to authentication modals#938MohitSoni2021 wants to merge 1 commit into
MohitSoni2021 wants to merge 1 commit into
Conversation
…d improved styling
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR upgrades the authentication modal UI and adds interaction enhancements (close button, password visibility toggle, and profile-button behavior) while moving modal styling out of inline attributes into CSS.
Changes:
- Replaced inline-styled auth modal markup with class-based styling and added a close button + password visibility toggle.
- Added a
profile-btnID and click logic to open the auth modal when logged out (or show current user when logged in). - Added new CSS rules for the auth modal (“premium” look & feel).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| index.html | Refactors auth modal markup, adds close/password-toggle/profile button behaviors, and adjusts login/signup handling. |
| css/index.css | Introduces dedicated styles for the auth modal backdrop, card, inputs, and buttons. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+16
to
+17
| <div id="auth-modal" class="auth-backdrop"> | ||
| <div class="auth-card"> |
| </svg> | ||
| </button> | ||
|
|
||
| <h2 id="auth-title" style="margin:0 0 8px; font-size:22px; font-weight:700;">Welcome back</h2> |
| <input id="auth-password" type="password" placeholder="Password" style="width:100%; padding:12px; border:1px solid #ddd; border-radius:8px; font-size:14px; margin-bottom:20px; box-sizing:border-box;"> | ||
| <div class="auth-input-group" style="margin-bottom: 20px;"> | ||
| <input id="auth-password" type="password" placeholder="Password" class="auth-input auth-input-password"> | ||
| <button id="auth-password-toggle" type="button" class="auth-eye-btn" aria-label="Toggle password visibility"> |
Comment on lines
+368
to
+375
| document.getElementById('profile-btn').addEventListener('click', () => { | ||
| if (!localStorage.getItem('studyplan_user')) { | ||
| document.getElementById('auth-modal').style.display = 'flex'; | ||
| } else { | ||
| const user = JSON.parse(localStorage.getItem('studyplan_user')); | ||
| alert(`Logged in as: ${user.email}`); | ||
| } | ||
| }); |
Comment on lines
+4994
to
+4999
| .auth-card { | ||
| background: var(--color-background-primary); | ||
| border: 1px solid var(--color-border-tertiary); | ||
| border-radius: 16px; | ||
| padding: 32px; | ||
| width: 360px; |
Comment on lines
+4982
to
+4992
| .auth-backdrop { | ||
| display: flex; | ||
| position: fixed; | ||
| inset: 0; | ||
| background: rgba(0, 0, 0, 0.6); | ||
| backdrop-filter: blur(6px); | ||
| z-index: 9999; | ||
| align-items: center; | ||
| justify-content: center; | ||
| transition: opacity 0.3s ease; | ||
| } |
Author
|
Implemented the requested enhancement from #935 by adding password visibility toggles to both Login and Signup modals. Key points:
Looking forward to feedback. Thanks for reviewing! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a password visibility toggle to the Login and Signup modal forms.
Changes Made
Related Issue
Fixes #935
Testing