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
062e2e91
Unverified
Commit
062e2e91
authored
Aug 21, 2023
by
Matri
Committed by
GitHub
Aug 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: login improvement (#941)
parent
e0a48c49
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
index.tsx
web/app/components/base/button/index.tsx
+3
-0
normalForm.tsx
web/app/signin/normalForm.tsx
+5
-0
No files found.
web/app/components/base/button/index.tsx
View file @
062e2e91
...
@@ -7,6 +7,7 @@ export type IButtonProps = {
...
@@ -7,6 +7,7 @@ export type IButtonProps = {
className
?:
string
className
?:
string
disabled
?:
boolean
disabled
?:
boolean
loading
?:
boolean
loading
?:
boolean
tabIndex
?:
number
children
:
React
.
ReactNode
children
:
React
.
ReactNode
onClick
?:
MouseEventHandler
<
HTMLDivElement
>
onClick
?:
MouseEventHandler
<
HTMLDivElement
>
}
}
...
@@ -18,6 +19,7 @@ const Button: FC<IButtonProps> = ({
...
@@ -18,6 +19,7 @@ const Button: FC<IButtonProps> = ({
className
,
className
,
onClick
,
onClick
,
loading
=
false
,
loading
=
false
,
tabIndex
,
})
=>
{
})
=>
{
let
style
=
'cursor-pointer'
let
style
=
'cursor-pointer'
switch
(
type
)
{
switch
(
type
)
{
...
@@ -35,6 +37,7 @@ const Button: FC<IButtonProps> = ({
...
@@ -35,6 +37,7 @@ const Button: FC<IButtonProps> = ({
return
(
return
(
<
div
<
div
className=
{
`inline-flex justify-center items-center content-center h-9 leading-5 rounded-lg px-4 py-2 text-base ${style} ${className && className}`
}
className=
{
`inline-flex justify-center items-center content-center h-9 leading-5 rounded-lg px-4 py-2 text-base ${style} ${className && className}`
}
tabIndex=
{
tabIndex
}
onClick=
{
disabled
?
undefined
:
onClick
}
onClick=
{
disabled
?
undefined
:
onClick
}
>
>
{
children
}
{
children
}
...
...
web/app/signin/normalForm.tsx
View file @
062e2e91
...
@@ -237,6 +237,10 @@ const NormalForm = () => {
...
@@ -237,6 +237,10 @@ const NormalForm = () => {
id=
"password"
id=
"password"
value=
{
password
}
value=
{
password
}
onChange=
{
e
=>
setPassword
(
e
.
target
.
value
)
}
onChange=
{
e
=>
setPassword
(
e
.
target
.
value
)
}
onKeyDown=
{
(
e
)
=>
{
if
(
e
.
key
===
'Enter'
)
handleEmailPasswordLogin
()
}
}
type=
{
showPassword
?
'text'
:
'password'
}
type=
{
showPassword
?
'text'
:
'password'
}
autoComplete=
"current-password"
autoComplete=
"current-password"
placeholder=
{
t
(
'login.passwordPlaceholder'
)
||
''
}
placeholder=
{
t
(
'login.passwordPlaceholder'
)
||
''
}
...
@@ -256,6 +260,7 @@ const NormalForm = () => {
...
@@ -256,6 +260,7 @@ const NormalForm = () => {
<
div
className=
'mb-2'
>
<
div
className=
'mb-2'
>
<
Button
<
Button
tabIndex=
{
0
}
type=
'primary'
type=
'primary'
onClick=
{
handleEmailPasswordLogin
}
onClick=
{
handleEmailPasswordLogin
}
disabled=
{
isLoading
}
disabled=
{
isLoading
}
...
...
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