Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend-data-crawler-be
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BangNSK
frontend-data-crawler-be
Commits
060f545a
Commit
060f545a
authored
Jul 29, 2026
by
BangNSK
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: add password visibility toggle to login
parent
a9857517
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
20 deletions
+13
-20
Login.tsx
src/pages/Login.tsx
+12
-20
feedback-regression.test.mjs
tests/feedback-regression.test.mjs
+1
-0
No files found.
src/pages/Login.tsx
View file @
060f545a
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
import
{
useNavigate
,
Link
}
from
'react-router-dom'
;
import
{
useNavigate
,
Link
}
from
'react-router-dom'
;
import
{
useAuth
}
from
'../context/auth'
;
import
{
useAuth
}
from
'../context/auth'
;
import
{
Database
,
Lock
,
Mail
,
Loader2
}
from
'lucide-react'
;
import
{
Database
,
Mail
,
Loader2
}
from
'lucide-react'
;
import
{
api
}
from
'../services/api'
;
import
{
api
}
from
'../services/api'
;
import
{
PasswordInput
}
from
'../components/PasswordInput'
;
export
const
Login
:
React
.
FC
=
()
=>
{
export
const
Login
:
React
.
FC
=
()
=>
{
const
{
login
}
=
useAuth
();
const
{
login
}
=
useAuth
();
...
@@ -137,25 +138,16 @@ export const Login: React.FC = () => {
...
@@ -137,25 +138,16 @@ export const Login: React.FC = () => {
</
div
>
</
div
>
<
div
>
<
div
>
<
label
htmlFor=
"password"
className=
"block text-sm font-medium text-slate-700 mb-1"
>
<
PasswordInput
Mật khẩu
</
label
>
<
div
className=
"relative"
>
<
div
className=
"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-slate-400"
>
<
Lock
className=
"h-5 w-5"
/>
</
div
>
<
input
id=
"password"
id=
"password"
name=
"password"
name=
"password"
type=
"password
"
label=
"Mật khẩu
"
autoComplete=
"current-password"
autoComplete=
"current-password"
required
required
value=
{
password
}
value=
{
password
}
onChange=
{
(
e
)
=>
setPassword
(
e
.
target
.
value
)
}
onChange=
{
(
e
)
=>
setPassword
(
e
.
target
.
value
)
}
className=
"block w-full rounded-lg border border-slate-300 bg-white py-2.5 pl-10 pr-3 text-slate-900 placeholder-slate-400 focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500 sm:text-sm"
placeholder=
"••••••••"
placeholder=
"••••••••"
/>
/>
</
div
>
<
div
className=
"mt-2 text-right"
>
<
div
className=
"mt-2 text-right"
>
<
Link
to=
"/forgot-password"
className=
"text-sm font-medium text-indigo-600 hover:text-indigo-500"
>
<
Link
to=
"/forgot-password"
className=
"text-sm font-medium text-indigo-600 hover:text-indigo-500"
>
Quên mật khẩu?
Quên mật khẩu?
...
...
tests/feedback-regression.test.mjs
View file @
060f545a
...
@@ -24,6 +24,7 @@ test('login puts forgot-password below the password field and localizes invalid
...
@@ -24,6 +24,7 @@ test('login puts forgot-password below the password field and localizes invalid
test
(
'all requested password forms expose visibility controls'
,
()
=>
{
test
(
'all requested password forms expose visibility controls'
,
()
=>
{
for
(
const
file
of
[
for
(
const
file
of
[
'pages/Login.tsx'
,
'pages/Register.tsx'
,
'pages/Register.tsx'
,
'pages/Profile.tsx'
,
'pages/Profile.tsx'
,
'pages/ResetPassword.tsx'
,
'pages/ResetPassword.tsx'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment