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
05b85400
Commit
05b85400
authored
Nov 23, 2022
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable form if not dirty
parent
e8c80725
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
12 deletions
+12
-12
ApiKeyForm.tsx
ui/apiKey/ApiKeyModal/ApiKeyForm.tsx
+2
-2
CustomAbiForm.tsx
ui/customAbi/CustomAbiModal/CustomAbiForm.tsx
+2
-2
AddressForm.tsx
ui/privateTags/AddressModal/AddressForm.tsx
+2
-2
TransactionForm.tsx
ui/privateTags/TransactionModal/TransactionForm.tsx
+2
-2
PublicTagsForm.tsx
ui/publicTags/PublicTagsForm/PublicTagsForm.tsx
+2
-2
AddressForm.tsx
ui/watchlist/AddressModal/AddressForm.tsx
+2
-2
No files found.
ui/apiKey/ApiKeyModal/ApiKeyForm.tsx
View file @
05b85400
...
@@ -33,7 +33,7 @@ type Inputs = {
...
@@ -33,7 +33,7 @@ type Inputs = {
const
NAME_MAX_LENGTH
=
255
;
const
NAME_MAX_LENGTH
=
255
;
const
ApiKeyForm
:
React
.
FC
<
Props
>
=
({
data
,
onClose
,
setAlertVisible
})
=>
{
const
ApiKeyForm
:
React
.
FC
<
Props
>
=
({
data
,
onClose
,
setAlertVisible
})
=>
{
const
{
control
,
handleSubmit
,
formState
:
{
errors
,
isValid
},
setError
}
=
useForm
<
Inputs
>
({
const
{
control
,
handleSubmit
,
formState
:
{
errors
,
isValid
,
isDirty
},
setError
}
=
useForm
<
Inputs
>
({
mode
:
'
all
'
,
mode
:
'
all
'
,
defaultValues
:
{
defaultValues
:
{
token
:
data
?.
api_key
||
''
,
token
:
data
?.
api_key
||
''
,
...
@@ -145,7 +145,7 @@ const ApiKeyForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
...
@@ -145,7 +145,7 @@ const ApiKeyForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
<
Button
<
Button
size=
"lg"
size=
"lg"
type=
"submit"
type=
"submit"
disabled=
{
!
isValid
}
disabled=
{
!
isValid
||
!
isDirty
}
isLoading=
{
mutation
.
isLoading
}
isLoading=
{
mutation
.
isLoading
}
>
>
{
data
?
'
Save
'
:
'
Generate API key
'
}
{
data
?
'
Save
'
:
'
Generate API key
'
}
...
...
ui/customAbi/CustomAbiModal/CustomAbiForm.tsx
View file @
05b85400
...
@@ -37,7 +37,7 @@ type Inputs = {
...
@@ -37,7 +37,7 @@ type Inputs = {
const
NAME_MAX_LENGTH
=
255
;
const
NAME_MAX_LENGTH
=
255
;
const
CustomAbiForm
:
React
.
FC
<
Props
>
=
({
data
,
onClose
,
setAlertVisible
})
=>
{
const
CustomAbiForm
:
React
.
FC
<
Props
>
=
({
data
,
onClose
,
setAlertVisible
})
=>
{
const
{
control
,
formState
:
{
errors
,
isValid
},
handleSubmit
,
setError
}
=
useForm
<
Inputs
>
({
const
{
control
,
formState
:
{
errors
,
isValid
,
isDirty
},
handleSubmit
,
setError
}
=
useForm
<
Inputs
>
({
defaultValues
:
{
defaultValues
:
{
contract_address_hash
:
data
?.
contract_address_hash
||
''
,
contract_address_hash
:
data
?.
contract_address_hash
||
''
,
name
:
data
?.
name
||
''
,
name
:
data
?.
name
||
''
,
...
@@ -171,7 +171,7 @@ const CustomAbiForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
...
@@ -171,7 +171,7 @@ const CustomAbiForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
<
Button
<
Button
size=
"lg"
size=
"lg"
type=
"submit"
type=
"submit"
disabled=
{
!
isValid
}
disabled=
{
!
isValid
||
!
isDirty
}
isLoading=
{
mutation
.
isLoading
}
isLoading=
{
mutation
.
isLoading
}
>
>
{
data
?
'
Save
'
:
'
Create custom ABI
'
}
{
data
?
'
Save
'
:
'
Create custom ABI
'
}
...
...
ui/privateTags/AddressModal/AddressForm.tsx
View file @
05b85400
...
@@ -34,7 +34,7 @@ type Inputs = {
...
@@ -34,7 +34,7 @@ type Inputs = {
const
AddressForm
:
React
.
FC
<
Props
>
=
({
data
,
onClose
,
setAlertVisible
})
=>
{
const
AddressForm
:
React
.
FC
<
Props
>
=
({
data
,
onClose
,
setAlertVisible
})
=>
{
const
fetch
=
useFetch
();
const
fetch
=
useFetch
();
const
[
pending
,
setPending
]
=
useState
(
false
);
const
[
pending
,
setPending
]
=
useState
(
false
);
const
{
control
,
handleSubmit
,
formState
:
{
errors
,
isValid
},
setError
}
=
useForm
<
Inputs
>
({
const
{
control
,
handleSubmit
,
formState
:
{
errors
,
isValid
,
isDirty
},
setError
}
=
useForm
<
Inputs
>
({
mode
:
'
all
'
,
mode
:
'
all
'
,
defaultValues
:
{
defaultValues
:
{
address
:
data
?.
address_hash
||
''
,
address
:
data
?.
address_hash
||
''
,
...
@@ -120,7 +120,7 @@ const AddressForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
...
@@ -120,7 +120,7 @@ const AddressForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
<
Button
<
Button
size=
"lg"
size=
"lg"
type=
"submit"
type=
"submit"
disabled=
{
!
isValid
}
disabled=
{
!
isValid
||
!
isDirty
}
isLoading=
{
pending
}
isLoading=
{
pending
}
>
>
{
data
?
'
Save changes
'
:
'
Add tag
'
}
{
data
?
'
Save changes
'
:
'
Add tag
'
}
...
...
ui/privateTags/TransactionModal/TransactionForm.tsx
View file @
05b85400
...
@@ -35,7 +35,7 @@ const TransactionForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) =>
...
@@ -35,7 +35,7 @@ const TransactionForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) =>
const
[
pending
,
setPending
]
=
useState
(
false
);
const
[
pending
,
setPending
]
=
useState
(
false
);
const
formBackgroundColor
=
useColorModeValue
(
'
white
'
,
'
gray.900
'
);
const
formBackgroundColor
=
useColorModeValue
(
'
white
'
,
'
gray.900
'
);
const
{
control
,
handleSubmit
,
formState
:
{
errors
,
isValid
},
setError
}
=
useForm
<
Inputs
>
({
const
{
control
,
handleSubmit
,
formState
:
{
errors
,
isValid
,
isDirty
},
setError
}
=
useForm
<
Inputs
>
({
mode
:
'
all
'
,
mode
:
'
all
'
,
defaultValues
:
{
defaultValues
:
{
transaction
:
data
?.
transaction_hash
||
''
,
transaction
:
data
?.
transaction_hash
||
''
,
...
@@ -119,7 +119,7 @@ const TransactionForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) =>
...
@@ -119,7 +119,7 @@ const TransactionForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) =>
<
Button
<
Button
size=
"lg"
size=
"lg"
type=
"submit"
type=
"submit"
disabled=
{
!
isValid
}
disabled=
{
!
isValid
||
!
isDirty
}
isLoading=
{
pending
}
isLoading=
{
pending
}
>
>
{
data
?
'
Save changes
'
:
'
Add tag
'
}
{
data
?
'
Save changes
'
:
'
Add tag
'
}
...
...
ui/publicTags/PublicTagsForm/PublicTagsForm.tsx
View file @
05b85400
...
@@ -61,7 +61,7 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
...
@@ -61,7 +61,7 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
const
fetch
=
useFetch
();
const
fetch
=
useFetch
();
const
inputSize
=
{
base
:
'
md
'
,
lg
:
'
lg
'
};
const
inputSize
=
{
base
:
'
md
'
,
lg
:
'
lg
'
};
const
{
control
,
handleSubmit
,
formState
:
{
errors
,
isValid
},
setError
}
=
useForm
<
Inputs
>
({
const
{
control
,
handleSubmit
,
formState
:
{
errors
,
isValid
,
isDirty
},
setError
}
=
useForm
<
Inputs
>
({
defaultValues
:
{
defaultValues
:
{
fullName
:
data
?.
full_name
||
''
,
fullName
:
data
?.
full_name
||
''
,
email
:
data
?.
email
||
''
,
email
:
data
?.
email
||
''
,
...
@@ -237,7 +237,7 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
...
@@ -237,7 +237,7 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
<
Button
<
Button
size=
"lg"
size=
"lg"
type=
"submit"
type=
"submit"
disabled=
{
!
isValid
}
disabled=
{
!
isValid
||
!
isDirty
}
isLoading=
{
mutation
.
isLoading
}
isLoading=
{
mutation
.
isLoading
}
>
>
Send request
Send request
...
...
ui/watchlist/AddressModal/AddressForm.tsx
View file @
05b85400
...
@@ -73,7 +73,7 @@ const AddressForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
...
@@ -73,7 +73,7 @@ const AddressForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
notificationsDefault
=
data
.
notification_settings
;
notificationsDefault
=
data
.
notification_settings
;
}
}
const
{
control
,
handleSubmit
,
formState
:
{
errors
,
isValid
},
setError
}
=
useForm
<
Inputs
>
({
const
{
control
,
handleSubmit
,
formState
:
{
errors
,
isValid
,
isDirty
},
setError
}
=
useForm
<
Inputs
>
({
defaultValues
:
{
defaultValues
:
{
address
:
data
?.
address_hash
||
''
,
address
:
data
?.
address_hash
||
''
,
tag
:
data
?.
name
||
''
,
tag
:
data
?.
name
||
''
,
...
@@ -191,7 +191,7 @@ const AddressForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
...
@@ -191,7 +191,7 @@ const AddressForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
size=
"lg"
size=
"lg"
type=
"submit"
type=
"submit"
isLoading=
{
pending
}
isLoading=
{
pending
}
disabled=
{
!
isValid
}
disabled=
{
!
isValid
||
!
isDirty
}
>
>
{
data
?
'
Save changes
'
:
'
Add address
'
}
{
data
?
'
Save changes
'
:
'
Add address
'
}
</
Button
>
</
Button
>
...
...
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