Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
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
ai-tech
dify
Commits
dd1172b5
Unverified
Commit
dd1172b5
authored
Jul 24, 2023
by
Selenium39
Committed by
GitHub
Jul 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Perf: Support for password display and hiding (#636)
Co-authored-by:
Selenium39
<
selenium39@qq.com
>
parent
67d326a5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
installForm.tsx
web/app/install/installForm.tsx
+11
-1
No files found.
web/app/install/installForm.tsx
View file @
dd1172b5
...
...
@@ -17,6 +17,7 @@ const InstallForm = () => {
const
[
email
,
setEmail
]
=
React
.
useState
(
''
)
const
[
name
,
setName
]
=
React
.
useState
(
''
)
const
[
password
,
setPassword
]
=
React
.
useState
(
''
)
const
[
showPassword
,
setShowPassword
]
=
React
.
useState
(
false
)
const
showErrorMessage
=
(
message
:
string
)
=>
{
Toast
.
notify
({
type
:
'error'
,
...
...
@@ -108,12 +109,21 @@ const InstallForm = () => {
<
div
className=
"mt-1 relative rounded-md shadow-sm"
>
<
input
id=
"password"
type=
'password'
type=
{
showPassword
?
'text'
:
'password'
}
value=
{
password
}
onChange=
{
e
=>
setPassword
(
e
.
target
.
value
)
}
placeholder=
{
t
(
'login.passwordPlaceholder'
)
||
''
}
className=
{
'appearance-none block w-full rounded-lg pl-[14px] px-3 py-2 border border-gray-200 hover:border-gray-300 hover:shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 placeholder-gray-400 caret-primary-600 sm:text-sm pr-10'
}
/>
<
div
className=
"absolute inset-y-0 right-0 flex items-center pr-3"
>
<
button
type=
"button"
onClick=
{
()
=>
setShowPassword
(
!
showPassword
)
}
className=
"text-gray-400 hover:text-gray-500 focus:outline-none focus:text-gray-500"
>
{
showPassword
?
'👀'
:
'😝'
}
</
button
>
</
div
>
</
div
>
<
div
className=
'mt-1 text-xs text-gray-500'
>
{
t
(
'login.error.passwordInvalid'
)
}
</
div
>
...
...
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