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
1a7329fa
Commit
1a7329fa
authored
Mar 13, 2025
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix FormFieldSelect default values
parent
16185d52
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
12 additions
and
15 deletions
+12
-15
input.recipe.ts
toolkit/theme/recipes/input.recipe.ts
+1
-0
PublicTagsSubmitFieldTag.tsx
ui/publicTags/submit/fields/PublicTagsSubmitFieldTag.tsx
+2
-2
PublicTagsSubmitFieldTags.tsx
ui/publicTags/submit/fields/PublicTagsSubmitFieldTags.tsx
+1
-1
types.ts
ui/publicTags/submit/types.ts
+1
-3
utils.ts
ui/publicTags/submit/utils.ts
+3
-3
FormFieldSelect.tsx
ui/shared/forms/fields/FormFieldSelect.tsx
+0
-1
AuthModal.tsx
ui/snippets/auth/AuthModal.tsx
+1
-0
types.ts
ui/tokenInfo/types.ts
+1
-3
utils.ts
ui/tokenInfo/utils.ts
+2
-2
No files found.
toolkit/theme/recipes/input.recipe.ts
View file @
1a7329fa
...
@@ -24,6 +24,7 @@ export const recipe = defineRecipe({
...
@@ -24,6 +24,7 @@ export const recipe = defineRecipe({
whiteSpace
:
'
nowrap
'
,
whiteSpace
:
'
nowrap
'
,
},
},
_autofill
:
{
_autofill
:
{
// TODO @tom2drum: fix webkit autofill color
// FIXME: this is not working
// FIXME: this is not working
// WebkitTextFillColor: '{colors.input.fg}',
// WebkitTextFillColor: '{colors.input.fg}',
},
},
...
...
ui/publicTags/submit/fields/PublicTagsSubmitFieldTag.tsx
View file @
1a7329fa
...
@@ -126,7 +126,7 @@ const PublicTagsSubmitFieldTag = ({ index, isDisabled, errors, onAddClick, onRem
...
@@ -126,7 +126,7 @@ const PublicTagsSubmitFieldTag = ({ index, isDisabled, errors, onAddClick, onRem
<
Flex
flexDir=
"column"
alignItems=
"flex-start"
mt=
{
10
}
rowGap=
{
2
}
>
<
Flex
flexDir=
"column"
alignItems=
"flex-start"
mt=
{
10
}
rowGap=
{
2
}
>
<
EntityTag
data=
{
{
<
EntityTag
data=
{
{
name
:
field
.
name
||
'
Tag name
'
,
name
:
field
.
name
||
'
Tag name
'
,
tagType
:
field
.
type
[
0
]
.
value
,
tagType
:
field
.
type
[
0
],
meta
:
{
meta
:
{
tagUrl
:
field
.
url
,
tagUrl
:
field
.
url
,
bgColor
:
field
.
bgColor
&&
colorValidator
(
field
.
bgColor
)
===
true
?
field
.
bgColor
:
undefined
,
bgColor
:
field
.
bgColor
&&
colorValidator
(
field
.
bgColor
)
===
true
?
field
.
bgColor
:
undefined
,
...
@@ -137,7 +137,7 @@ const PublicTagsSubmitFieldTag = ({ index, isDisabled, errors, onAddClick, onRem
...
@@ -137,7 +137,7 @@ const PublicTagsSubmitFieldTag = ({ index, isDisabled, errors, onAddClick, onRem
ordinal
:
0
,
ordinal
:
0
,
}
}
/>
}
}
/>
<
chakra
.
span
color=
"text.secondary"
fontSize=
"sm"
>
<
chakra
.
span
color=
"text.secondary"
fontSize=
"sm"
>
{
tagTypes
?.
find
(({
type
})
=>
type
===
field
.
type
[
0
]
.
value
)?.
description
}
{
tagTypes
?.
find
(({
type
})
=>
type
===
field
.
type
[
0
])?.
description
}
</
chakra
.
span
>
</
chakra
.
span
>
</
Flex
>
</
Flex
>
)
}
)
}
...
...
ui/publicTags/submit/fields/PublicTagsSubmitFieldTags.tsx
View file @
1a7329fa
...
@@ -24,7 +24,7 @@ const PublicTagsSubmitFieldTags = ({ tagTypes }: Props) => {
...
@@ -24,7 +24,7 @@ const PublicTagsSubmitFieldTags = ({ tagTypes }: Props) => {
const
handleAddFieldClick
=
React
.
useCallback
((
index
:
number
)
=>
{
const
handleAddFieldClick
=
React
.
useCallback
((
index
:
number
)
=>
{
insert
(
index
+
1
,
{
insert
(
index
+
1
,
{
name
:
''
,
name
:
''
,
type
:
[
{
label
:
'
Name
'
,
value
:
'
name
'
}
],
type
:
[
'
name
'
],
url
:
undefined
,
url
:
undefined
,
bgColor
:
undefined
,
bgColor
:
undefined
,
textColor
:
undefined
,
textColor
:
undefined
,
...
...
ui/publicTags/submit/types.ts
View file @
1a7329fa
import
type
{
AddressMetadataTagType
}
from
'
types/api/addressMetadata
'
;
import
type
{
AddressMetadataTagType
}
from
'
types/api/addressMetadata
'
;
import
type
{
SelectOption
}
from
'
toolkit/chakra/select
'
;
export
interface
FormFields
{
export
interface
FormFields
{
requesterName
:
string
;
requesterName
:
string
;
requesterEmail
:
string
;
requesterEmail
:
string
;
...
@@ -14,7 +12,7 @@ export interface FormFields {
...
@@ -14,7 +12,7 @@ export interface FormFields {
export
interface
FormFieldTag
{
export
interface
FormFieldTag
{
name
:
string
;
name
:
string
;
type
:
Array
<
SelectOption
<
AddressMetadataTagType
>
>
;
type
:
Array
<
AddressMetadataTagType
>
;
url
:
string
|
undefined
;
url
:
string
|
undefined
;
bgColor
:
string
|
undefined
;
bgColor
:
string
|
undefined
;
textColor
:
string
|
undefined
;
textColor
:
string
|
undefined
;
...
...
ui/publicTags/submit/utils.ts
View file @
1a7329fa
...
@@ -19,7 +19,7 @@ export function convertFormDataToRequestsBody(data: FormFields): Array<SubmitReq
...
@@ -19,7 +19,7 @@ export function convertFormDataToRequestsBody(data: FormFields): Array<SubmitReq
companyWebsite
:
data
.
companyWebsite
,
companyWebsite
:
data
.
companyWebsite
,
address
:
address
.
hash
,
address
:
address
.
hash
,
name
:
tag
.
name
,
name
:
tag
.
name
,
tagType
:
tag
.
type
[
0
]
.
value
,
tagType
:
tag
.
type
[
0
],
description
:
data
.
description
,
description
:
data
.
description
,
meta
:
pickBy
({
meta
:
pickBy
({
bgColor
:
tag
.
bgColor
,
bgColor
:
tag
.
bgColor
,
...
@@ -37,7 +37,7 @@ export function convertFormDataToRequestsBody(data: FormFields): Array<SubmitReq
...
@@ -37,7 +37,7 @@ export function convertFormDataToRequestsBody(data: FormFields): Array<SubmitReq
export
function
convertTagApiFieldsToFormFields
(
tag
:
Pick
<
SubmitRequestBody
,
'
name
'
|
'
tagType
'
|
'
meta
'
>
):
FormFieldTag
{
export
function
convertTagApiFieldsToFormFields
(
tag
:
Pick
<
SubmitRequestBody
,
'
name
'
|
'
tagType
'
|
'
meta
'
>
):
FormFieldTag
{
return
{
return
{
name
:
tag
.
name
,
name
:
tag
.
name
,
type
:
[
{
label
:
tag
.
tagType
,
value
:
tag
.
tagType
}
],
type
:
[
tag
.
tagType
],
url
:
tag
.
meta
.
tagUrl
,
url
:
tag
.
meta
.
tagUrl
,
bgColor
:
tag
.
meta
.
bgColor
,
bgColor
:
tag
.
meta
.
bgColor
,
textColor
:
tag
.
meta
.
textColor
,
textColor
:
tag
.
meta
.
textColor
,
...
@@ -104,7 +104,7 @@ export function getFormDefaultValues(query: Route['query'], userInfo: UserInfo |
...
@@ -104,7 +104,7 @@ export function getFormDefaultValues(query: Route['query'], userInfo: UserInfo |
requesterEmail
:
getQueryParamString
(
query
?.
requesterEmail
)
||
userInfo
?.
email
||
undefined
,
requesterEmail
:
getQueryParamString
(
query
?.
requesterEmail
)
||
userInfo
?.
email
||
undefined
,
companyName
:
getQueryParamString
(
query
?.
companyName
),
companyName
:
getQueryParamString
(
query
?.
companyName
),
companyWebsite
:
getQueryParamString
(
query
?.
companyWebsite
),
companyWebsite
:
getQueryParamString
(
query
?.
companyWebsite
),
tags
:
[
{
name
:
''
,
type
:
[
{
label
:
'
Name
'
,
value
:
'
name
'
as
const
}
]
}
],
tags
:
[
{
name
:
''
,
type
:
[
'
name
'
as
const
]
}
],
};
};
}
}
...
...
ui/shared/forms/fields/FormFieldSelect.tsx
View file @
1a7329fa
...
@@ -35,7 +35,6 @@ const FormFieldSelect = <
...
@@ -35,7 +35,6 @@ const FormFieldSelect = <
field
.
onBlur
();
field
.
onBlur
();
},
[
field
]);
},
[
field
]);
// TODO @tom2drum: fix initial value is not displayed in the select
return
(
return
(
<
SelectRoot
<
SelectRoot
ref=
{
field
.
ref
}
ref=
{
field
.
ref
}
...
...
ui/snippets/auth/AuthModal.tsx
View file @
1a7329fa
...
@@ -19,6 +19,7 @@ import AuthModalScreenSelectMethod from './screens/AuthModalScreenSelectMethod';
...
@@ -19,6 +19,7 @@ import AuthModalScreenSelectMethod from './screens/AuthModalScreenSelectMethod';
import
AuthModalScreenSuccessEmail
from
'
./screens/AuthModalScreenSuccessEmail
'
;
import
AuthModalScreenSuccessEmail
from
'
./screens/AuthModalScreenSuccessEmail
'
;
import
AuthModalScreenSuccessWallet
from
'
./screens/AuthModalScreenSuccessWallet
'
;
import
AuthModalScreenSuccessWallet
from
'
./screens/AuthModalScreenSuccessWallet
'
;
// TODO @tom2drum: check login flow
const
feature
=
config
.
features
.
account
;
const
feature
=
config
.
features
.
account
;
interface
Props
{
interface
Props
{
...
...
ui/tokenInfo/types.ts
View file @
1a7329fa
import
type
{
SelectOption
}
from
'
toolkit/chakra/select
'
;
export
interface
Fields
extends
SocialLinkFields
,
TickerUrlFields
{
export
interface
Fields
extends
SocialLinkFields
,
TickerUrlFields
{
address
:
string
;
address
:
string
;
token_name
:
string
;
token_name
:
string
;
requester_name
:
string
;
requester_name
:
string
;
requester_email
:
string
;
requester_email
:
string
;
project_name
?:
string
;
project_name
?:
string
;
project_sector
:
Array
<
SelectOption
>
|
null
;
project_sector
:
Array
<
string
>
|
null
;
project_email
:
string
;
project_email
:
string
;
project_website
:
string
;
project_website
:
string
;
project_description
:
string
;
project_description
:
string
;
...
...
ui/tokenInfo/utils.ts
View file @
1a7329fa
...
@@ -12,7 +12,7 @@ export function getFormDefaultValues(address: string, tokenName: string, applica
...
@@ -12,7 +12,7 @@ export function getFormDefaultValues(address: string, tokenName: string, applica
requester_name
:
application
.
requesterName
,
requester_name
:
application
.
requesterName
,
requester_email
:
application
.
requesterEmail
,
requester_email
:
application
.
requesterEmail
,
project_name
:
application
.
projectName
,
project_name
:
application
.
projectName
,
project_sector
:
application
.
projectSector
?
[
{
value
:
application
.
projectSector
,
label
:
application
.
projectSector
}
]
:
null
,
project_sector
:
application
.
projectSector
?
[
application
.
projectSector
]
:
null
,
project_email
:
application
.
projectEmail
,
project_email
:
application
.
projectEmail
,
project_website
:
application
.
projectWebsite
,
project_website
:
application
.
projectWebsite
,
project_description
:
application
.
projectDescription
||
''
,
project_description
:
application
.
projectDescription
||
''
,
...
@@ -52,7 +52,7 @@ export function prepareRequestBody(data: Fields): Omit<TokenInfoApplication, 'id
...
@@ -52,7 +52,7 @@ export function prepareRequestBody(data: Fields): Omit<TokenInfoApplication, 'id
projectDescription
:
data
.
project_description
,
projectDescription
:
data
.
project_description
,
projectEmail
:
data
.
project_email
,
projectEmail
:
data
.
project_email
,
projectName
:
data
.
project_name
,
projectName
:
data
.
project_name
,
projectSector
:
data
.
project_sector
?.[
0
]
?.
value
,
projectSector
:
data
.
project_sector
?.[
0
],
projectWebsite
:
data
.
project_website
,
projectWebsite
:
data
.
project_website
,
reddit
:
data
.
reddit
,
reddit
:
data
.
reddit
,
requesterEmail
:
data
.
requester_email
,
requesterEmail
:
data
.
requester_email
,
...
...
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