Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
vicotor
frontend
Commits
ae719096
Commit
ae719096
authored
Nov 22, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
submit form when pressing enter
parent
cdb00cb2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
18 deletions
+24
-18
ApiKeyForm.tsx
ui/apiKey/ApiKeyModal/ApiKeyForm.tsx
+3
-3
CustomAbiForm.tsx
ui/customAbi/CustomAbiModal/CustomAbiForm.tsx
+3
-3
AddressForm.tsx
ui/privateTags/AddressModal/AddressForm.tsx
+3
-3
TransactionForm.tsx
ui/privateTags/TransactionModal/TransactionForm.tsx
+3
-3
PublicTagsForm.tsx
ui/publicTags/PublicTagsForm/PublicTagsForm.tsx
+9
-3
AddressForm.tsx
ui/watchlist/AddressModal/AddressForm.tsx
+3
-3
No files found.
ui/apiKey/ApiKeyModal/ApiKeyForm.tsx
View file @
ae719096
...
@@ -120,7 +120,7 @@ const ApiKeyForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
...
@@ -120,7 +120,7 @@ const ApiKeyForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
},
[
errors
,
formBackgroundColor
]);
},
[
errors
,
formBackgroundColor
]);
return
(
return
(
<>
<
form
noValidate
onSubmit=
{
handleSubmit
(
onSubmit
)
}
>
{
data
&&
(
{
data
&&
(
<
Box
marginBottom=
{
5
}
>
<
Box
marginBottom=
{
5
}
>
<
Controller
<
Controller
...
@@ -144,14 +144,14 @@ const ApiKeyForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
...
@@ -144,14 +144,14 @@ const ApiKeyForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
<
Box
marginTop=
{
8
}
>
<
Box
marginTop=
{
8
}
>
<
Button
<
Button
size=
"lg"
size=
"lg"
onClick=
{
handleSubmit
(
onSubmit
)
}
type=
"submit"
disabled=
{
!
isValid
}
disabled=
{
!
isValid
}
isLoading=
{
mutation
.
isLoading
}
isLoading=
{
mutation
.
isLoading
}
>
>
{
data
?
'
Save
'
:
'
Generate API key
'
}
{
data
?
'
Save
'
:
'
Generate API key
'
}
</
Button
>
</
Button
>
</
Box
>
</
Box
>
</>
</
form
>
);
);
};
};
...
...
ui/customAbi/CustomAbiModal/CustomAbiForm.tsx
View file @
ae719096
...
@@ -139,7 +139,7 @@ const CustomAbiForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
...
@@ -139,7 +139,7 @@ const CustomAbiForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
}
, [ errors, formBackgroundColor ]);
}
, [ errors, formBackgroundColor ]);
return (
return (
<>
<
form
noValidate
onSubmit=
{
handleSubmit
(
onSubmit
)
}
>
<
Box
>
<
Box
>
<
Controller
<
Controller
name=
"contract_address_hash"
name=
"contract_address_hash"
...
@@ -170,14 +170,14 @@ const CustomAbiForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
...
@@ -170,14 +170,14 @@ const CustomAbiForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
<
Box
marginTop=
{
8
}
>
<
Box
marginTop=
{
8
}
>
<
Button
<
Button
size=
"lg"
size=
"lg"
onClick=
{
handleSubmit
(
onSubmit
)
}
type=
"submit"
disabled=
{
!
isValid
}
disabled=
{
!
isValid
}
isLoading=
{
mutation
.
isLoading
}
isLoading=
{
mutation
.
isLoading
}
>
>
{
data
?
'
Save
'
:
'
Create custom ABI
'
}
{
data
?
'
Save
'
:
'
Create custom ABI
'
}
</
Button
>
</
Button
>
</
Box
>
</
Box
>
</>
</
form
>
);
);
};
};
...
...
ui/privateTags/AddressModal/AddressForm.tsx
View file @
ae719096
...
@@ -93,7 +93,7 @@ const AddressForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
...
@@ -93,7 +93,7 @@ const AddressForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
}
, [ errors, formBackgroundColor ]);
}
, [ errors, formBackgroundColor ]);
return (
return (
<>
<
form
noValidate
onSubmit=
{
handleSubmit
(
onSubmit
)
}
>
<
Box
marginBottom=
{
5
}
>
<
Box
marginBottom=
{
5
}
>
<
Controller
<
Controller
name=
"address"
name=
"address"
...
@@ -119,14 +119,14 @@ const AddressForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
...
@@ -119,14 +119,14 @@ const AddressForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
<
Box
marginTop=
{
8
}
>
<
Box
marginTop=
{
8
}
>
<
Button
<
Button
size=
"lg"
size=
"lg"
onClick=
{
handleSubmit
(
onSubmit
)
}
type=
"submit"
disabled=
{
!
isValid
}
disabled=
{
!
isValid
}
isLoading=
{
pending
}
isLoading=
{
pending
}
>
>
{
data
?
'
Save changes
'
:
'
Add tag
'
}
{
data
?
'
Save changes
'
:
'
Add tag
'
}
</
Button
>
</
Button
>
</
Box
>
</
Box
>
</>
</
form
>
);
);
};
};
...
...
ui/privateTags/TransactionModal/TransactionForm.tsx
View file @
ae719096
...
@@ -92,7 +92,7 @@ const TransactionForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) =>
...
@@ -92,7 +92,7 @@ const TransactionForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) =>
}, [ errors, formBackgroundColor ]);
}, [ errors, formBackgroundColor ]);
return (
return (
<>
<
form
noValidate
onSubmit=
{
handleSubmit
(
onSubmit
)
}
>
<
Box
marginBottom=
{
5
}
>
<
Box
marginBottom=
{
5
}
>
<
Controller
<
Controller
name=
"transaction"
name=
"transaction"
...
@@ -118,14 +118,14 @@ const TransactionForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) =>
...
@@ -118,14 +118,14 @@ const TransactionForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) =>
<
Box
marginTop=
{
8
}
>
<
Box
marginTop=
{
8
}
>
<
Button
<
Button
size=
"lg"
size=
"lg"
onClick=
{
handleSubmit
(
onSubmit
)
}
type=
"submit"
disabled=
{
!
isValid
}
disabled=
{
!
isValid
}
isLoading=
{
pending
}
isLoading=
{
pending
}
>
>
{
data
?
'
Save changes
'
:
'
Add tag
'
}
{
data
?
'
Save changes
'
:
'
Add tag
'
}
</
Button
>
</
Button
>
</
Box
>
</
Box
>
</>
</
form
>
);
);
};
};
...
...
ui/publicTags/PublicTagsForm/PublicTagsForm.tsx
View file @
ae719096
...
@@ -5,6 +5,7 @@ import {
...
@@ -5,6 +5,7 @@ import {
GridItem
,
GridItem
,
Text
,
Text
,
HStack
,
HStack
,
chakra
,
}
from
'
@chakra-ui/react
'
;
}
from
'
@chakra-ui/react
'
;
import
{
useMutation
,
useQueryClient
}
from
'
@tanstack/react-query
'
;
import
{
useMutation
,
useQueryClient
}
from
'
@tanstack/react-query
'
;
import
React
,
{
useCallback
,
useState
}
from
'
react
'
;
import
React
,
{
useCallback
,
useState
}
from
'
react
'
;
...
@@ -151,7 +152,12 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
...
@@ -151,7 +152,12 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
},
[
changeToDataScreen
]);
},
[
changeToDataScreen
]);
return
(
return
(
<
Box
width=
{
{
base
:
'
auto
'
,
lg
:
`calc(100% - ${ ADDRESS_INPUT_BUTTONS_WIDTH }px)`
}
}
maxWidth=
"844px"
>
<
chakra
.
form
noValidate
width=
{
{
base
:
'
auto
'
,
lg
:
`calc(100% - ${ ADDRESS_INPUT_BUTTONS_WIDTH }px)`
}
}
maxWidth=
"844px"
onSubmit=
{
handleSubmit
(
onSubmit
)
}
>
{
isAlertVisible
&&
<
Box
mb=
{
4
}
><
FormSubmitAlert
/></
Box
>
}
{
isAlertVisible
&&
<
Box
mb=
{
4
}
><
FormSubmitAlert
/></
Box
>
}
<
Text
size=
"sm"
variant=
"secondary"
paddingBottom=
{
5
}
>
Company info
</
Text
>
<
Text
size=
"sm"
variant=
"secondary"
paddingBottom=
{
5
}
>
Company info
</
Text
>
<
Grid
templateColumns=
{
{
base
:
'
1fr
'
,
lg
:
'
1fr 1fr
'
}
}
rowGap=
{
4
}
columnGap=
{
5
}
>
<
Grid
templateColumns=
{
{
base
:
'
1fr
'
,
lg
:
'
1fr 1fr
'
}
}
rowGap=
{
4
}
columnGap=
{
5
}
>
...
@@ -230,7 +236,7 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
...
@@ -230,7 +236,7 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
<
HStack
spacing=
{
6
}
>
<
HStack
spacing=
{
6
}
>
<
Button
<
Button
size=
"lg"
size=
"lg"
onClick=
{
handleSubmit
(
onSubmit
)
}
type=
"submit"
disabled=
{
!
isValid
}
disabled=
{
!
isValid
}
isLoading=
{
mutation
.
isLoading
}
isLoading=
{
mutation
.
isLoading
}
>
>
...
@@ -245,7 +251,7 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
...
@@ -245,7 +251,7 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
Cancel
Cancel
</
Button
>
</
Button
>
</
HStack
>
</
HStack
>
</
Box
>
</
chakra
.
form
>
);
);
};
};
...
...
ui/watchlist/AddressModal/AddressForm.tsx
View file @
ae719096
...
@@ -151,7 +151,7 @@ const AddressForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
...
@@ -151,7 +151,7 @@ const AddressForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
), []);
), []);
return (
return (
<>
<
form
noValidate
onSubmit=
{
handleSubmit
(
onSubmit
)
}
>
<
Box
marginBottom=
{
5
}
>
<
Box
marginBottom=
{
5
}
>
<
Controller
<
Controller
name=
"address"
name=
"address"
...
@@ -189,14 +189,14 @@ const AddressForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
...
@@ -189,14 +189,14 @@ const AddressForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
<
Box
marginTop=
{
8
}
>
<
Box
marginTop=
{
8
}
>
<
Button
<
Button
size=
"lg"
size=
"lg"
onClick=
{
handleSubmit
(
onSubmit
)
}
type=
"submit"
isLoading=
{
pending
}
isLoading=
{
pending
}
disabled=
{
!
isValid
}
disabled=
{
!
isValid
}
>
>
{
data
?
'
Save changes
'
:
'
Add address
'
}
{
data
?
'
Save changes
'
:
'
Add address
'
}
</
Button
>
</
Button
>
</
Box
>
</
Box
>
</>
</
form
>
);
);
};
};
...
...
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