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
628f069c
Commit
628f069c
authored
Apr 12, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change layout and icons
parent
7f1c505d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
33 deletions
+68
-33
TokenDetails.tsx
ui/token/TokenDetails.tsx
+1
-8
TokenDetailsVerifiedInfo.tsx
ui/token/TokenDetails/TokenDetailsVerifiedInfo.tsx
+67
-25
No files found.
ui/token/TokenDetails.tsx
View file @
628f069c
...
@@ -99,14 +99,7 @@ const TokenDetails = ({ tokenQuery, verifiedInfoQuery, isVerifiedInfoEnabled }:
...
@@ -99,14 +99,7 @@ const TokenDetails = ({ tokenQuery, verifiedInfoQuery, isVerifiedInfoEnabled }:
rowGap=
{
{
base
:
1
,
lg
:
3
}
}
rowGap=
{
{
base
:
1
,
lg
:
3
}
}
templateColumns=
{
{
base
:
'
minmax(0, 1fr)
'
,
lg
:
'
auto minmax(0, 1fr)
'
}
}
overflow=
"hidden"
templateColumns=
{
{
base
:
'
minmax(0, 1fr)
'
,
lg
:
'
auto minmax(0, 1fr)
'
}
}
overflow=
"hidden"
>
>
{
verifiedInfoQuery
.
data
&&
(
{
verifiedInfoQuery
.
data
&&
<
TokenDetailsVerifiedInfo
data=
{
verifiedInfoQuery
.
data
}
/>
}
<
DetailsInfoItem
title=
"Links"
hint=
"Links"
>
<
TokenDetailsVerifiedInfo
data=
{
verifiedInfoQuery
.
data
}
/>
</
DetailsInfoItem
>
)
}
{
exchangeRate
&&
(
{
exchangeRate
&&
(
<
DetailsInfoItem
<
DetailsInfoItem
title=
"Price"
title=
"Price"
...
...
ui/token/TokenDetails/TokenDetailsVerifiedInfo.tsx
View file @
628f069c
...
@@ -3,10 +3,17 @@ import React from 'react';
...
@@ -3,10 +3,17 @@ import React from 'react';
import
type
{
TokenVerifiedInfo
}
from
'
types/api/token
'
;
import
type
{
TokenVerifiedInfo
}
from
'
types/api/token
'
;
import
githubIcon
from
'
icons/social/git.svg
'
;
import
iconDiscord
from
'
icons/social/discord_filled.svg
'
;
import
placeholderIcon
from
'
icons/social/stats.svg
'
;
import
iconFacebook
from
'
icons/social/facebook_filled.svg
'
;
import
telegramIcon
from
'
icons/social/telega.svg
'
;
import
iconGithub
from
'
icons/social/github_filled.svg
'
;
import
twitterIcon
from
'
icons/social/tweet.svg
'
;
import
iconLinkedIn
from
'
icons/social/linkedin_filled.svg
'
;
import
iconMedium
from
'
icons/social/medium_filled.svg
'
;
import
iconOpenSea
from
'
icons/social/opensea_filled.svg
'
;
import
iconReddit
from
'
icons/social/reddit_filled.svg
'
;
import
iconSlack
from
'
icons/social/slack_filled.svg
'
;
import
iconTelegram
from
'
icons/social/telegram_filled.svg
'
;
import
iconTwitter
from
'
icons/social/twitter_filled.svg
'
;
import
DetailsInfoItem
from
'
ui/shared/DetailsInfoItem
'
;
import
LinkExternal
from
'
ui/shared/LinkExternal
'
;
import
LinkExternal
from
'
ui/shared/LinkExternal
'
;
interface
Props
{
interface
Props
{
...
@@ -19,16 +26,16 @@ interface SocialLink {
...
@@ -19,16 +26,16 @@ interface SocialLink {
hint
:
string
;
hint
:
string
;
}
}
const
SOCIAL_LINKS
:
Array
<
SocialLink
>
=
[
const
SOCIAL_LINKS
:
Array
<
SocialLink
>
=
[
{
field
:
'
github
'
,
icon
:
githubIcon
,
hint
:
'
Github account
'
},
{
field
:
'
github
'
,
icon
:
iconGithub
,
hint
:
'
Github account
'
},
{
field
:
'
twitter
'
,
icon
:
twitterIcon
,
hint
:
'
Twitter account
'
},
{
field
:
'
twitter
'
,
icon
:
iconTwitter
,
hint
:
'
Twitter account
'
},
{
field
:
'
telegram
'
,
icon
:
telegramIcon
,
hint
:
'
Telegram account
'
},
{
field
:
'
telegram
'
,
icon
:
iconTelegram
,
hint
:
'
Telegram account
'
},
{
field
:
'
openSea
'
,
icon
:
placeholderIcon
,
hint
:
'
OpenSea page
'
},
{
field
:
'
openSea
'
,
icon
:
iconOpenSea
,
hint
:
'
OpenSea page
'
},
{
field
:
'
linkedin
'
,
icon
:
placeholderIco
n
,
hint
:
'
LinkedIn page
'
},
{
field
:
'
linkedin
'
,
icon
:
iconLinkedI
n
,
hint
:
'
LinkedIn page
'
},
{
field
:
'
facebook
'
,
icon
:
placeholderIcon
,
hint
:
'
Facebook account
'
},
{
field
:
'
facebook
'
,
icon
:
iconFacebook
,
hint
:
'
Facebook account
'
},
{
field
:
'
discord
'
,
icon
:
placeholderIcon
,
hint
:
'
Discord account
'
},
{
field
:
'
discord
'
,
icon
:
iconDiscord
,
hint
:
'
Discord account
'
},
{
field
:
'
medium
'
,
icon
:
placeholderIcon
,
hint
:
'
Medium account
'
},
{
field
:
'
medium
'
,
icon
:
iconMedium
,
hint
:
'
Medium account
'
},
{
field
:
'
slack
'
,
icon
:
placeholderIcon
,
hint
:
'
Slack account
'
},
{
field
:
'
slack
'
,
icon
:
iconSlack
,
hint
:
'
Slack account
'
},
{
field
:
'
reddit
'
,
icon
:
placeholderIcon
,
hint
:
'
Reddit account
'
},
{
field
:
'
reddit
'
,
icon
:
iconReddit
,
hint
:
'
Reddit account
'
},
];
];
const
TokenDetailsVerifiedInfo
=
({
data
}:
Props
)
=>
{
const
TokenDetailsVerifiedInfo
=
({
data
}:
Props
)
=>
{
...
@@ -39,23 +46,58 @@ const TokenDetailsVerifiedInfo = ({ data }: Props) => {
...
@@ -39,23 +46,58 @@ const TokenDetailsVerifiedInfo = ({ data }: Props) => {
}
catch
(
error
)
{
}
}
catch
(
error
)
{
}
})();
})();
const
supportLink
=
(()
=>
{
if
(
!
data
.
support
)
{
return
null
;
}
const
isEmail
=
data
.
support
.
includes
(
'
@
'
);
const
href
=
isEmail
?
`mailto:
${
data
.
support
}
`
:
data
.
support
;
return
(
<
DetailsInfoItem
title=
"Support"
hint=
"Links to the project's official website and social media channels."
>
<
Link
href=
{
href
}
target=
"_blank"
>
{
data
.
support
}
</
Link
>
</
DetailsInfoItem
>
);
})();
const
socialLinks
=
SOCIAL_LINKS
const
socialLinks
=
SOCIAL_LINKS
.
map
((
link
)
=>
({
...
link
,
href
:
data
[
link
.
field
]
}))
.
map
((
link
)
=>
({
...
link
,
href
:
data
[
link
.
field
]
}))
.
filter
(({
href
})
=>
href
);
.
filter
(({
href
})
=>
href
);
return
(
return
(
<
Flex
alignItems=
{
{
base
:
'
flex-start
'
,
lg
:
'
center
'
}
}
flexDir=
{
{
base
:
'
column
'
,
lg
:
'
row
'
}
}
rowGap=
{
2
}
columnGap=
{
6
}
>
<>
{
websiteName
&&
<
LinkExternal
href=
{
data
.
projectWebsite
}
>
{
websiteName
}
</
LinkExternal
>
}
<
DetailsInfoItem
{
socialLinks
.
length
>
0
&&
(
title=
"Links"
<
Flex
columnGap=
{
2
}
>
hint=
"Links to the project's official website and social media channels."
{
socialLinks
.
map
((
link
)
=>
(
>
<
Link
href=
{
link
.
href
}
key=
{
link
.
field
}
variant=
"secondary"
boxSize=
{
5
}
aria
-
label=
{
link
.
hint
}
title=
{
link
.
hint
}
target=
"_blank"
>
<
Flex
alignItems=
{
{
base
:
'
flex-start
'
,
lg
:
'
center
'
}
}
flexDir=
{
{
base
:
'
column
'
,
lg
:
'
row
'
}
}
rowGap=
{
2
}
columnGap=
{
6
}
>
<
Icon
as=
{
link
.
icon
}
boxSize=
{
5
}
/>
{
websiteName
&&
<
LinkExternal
href=
{
data
.
projectWebsite
}
fontSize=
"md"
>
{
websiteName
}
</
LinkExternal
>
}
</
Link
>
{
socialLinks
.
length
>
0
&&
(
))
}
<
Flex
columnGap=
{
2
}
>
{
socialLinks
.
map
((
link
)
=>
(
<
Link
key=
{
link
.
field
}
href=
{
link
.
href
}
variant=
"secondary"
boxSize=
{
5
}
aria
-
label=
{
link
.
hint
}
title=
{
link
.
hint
}
target=
"_blank"
>
<
Icon
as=
{
link
.
icon
}
boxSize=
{
5
}
/>
</
Link
>
))
}
</
Flex
>
)
}
</
Flex
>
</
Flex
>
)
}
</
DetailsInfoItem
>
</
Flex
>
{
supportLink
}
</>
);
);
};
};
...
...
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