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
baa20bff
Commit
baa20bff
authored
Dec 01, 2022
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
contract icon, temporary
parent
6fbf652a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
4 deletions
+37
-4
CustomAbiListItem.tsx
ui/customAbi/CustomAbiTable/CustomAbiListItem.tsx
+1
-1
CustomAbiTableItem.tsx
ui/customAbi/CustomAbiTable/CustomAbiTableItem.tsx
+1
-1
AddressSnippet.tsx
ui/shared/AddressSnippet.tsx
+6
-2
AddressContractIcon.tsx
ui/shared/address/AddressContractIcon.tsx
+29
-0
No files found.
ui/customAbi/CustomAbiTable/CustomAbiListItem.tsx
View file @
baa20bff
...
@@ -24,7 +24,7 @@ const CustomAbiListItem = ({ item, onEditClick, onDeleteClick }: Props) => {
...
@@ -24,7 +24,7 @@ const CustomAbiListItem = ({ item, onEditClick, onDeleteClick }: Props) => {
return
(
return
(
<
AccountListItemMobile
>
<
AccountListItemMobile
>
<
AddressSnippet
address=
{
item
.
contract_address_hash
}
subtitle=
{
item
.
name
}
/>
<
AddressSnippet
address=
{
item
.
contract_address_hash
}
subtitle=
{
item
.
name
}
isContract
/>
<
TableItemActionButtons
onDeleteClick=
{
onItemDeleteClick
}
onEditClick=
{
onItemEditClick
}
/>
<
TableItemActionButtons
onDeleteClick=
{
onItemDeleteClick
}
onEditClick=
{
onItemEditClick
}
/>
</
AccountListItemMobile
>
</
AccountListItemMobile
>
);
);
...
...
ui/customAbi/CustomAbiTable/CustomAbiTableItem.tsx
View file @
baa20bff
...
@@ -28,7 +28,7 @@ const CustomAbiTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
...
@@ -28,7 +28,7 @@ const CustomAbiTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
return
(
return
(
<
Tr
alignItems=
"top"
key=
{
item
.
id
}
>
<
Tr
alignItems=
"top"
key=
{
item
.
id
}
>
<
Td
>
<
Td
>
<
AddressSnippet
address=
{
item
.
contract_address_hash
}
subtitle=
{
item
.
name
}
/>
<
AddressSnippet
address=
{
item
.
contract_address_hash
}
subtitle=
{
item
.
name
}
isContract
/>
</
Td
>
</
Td
>
<
Td
>
<
Td
>
<
TableItemActionButtons
onDeleteClick=
{
onItemDeleteClick
}
onEditClick=
{
onItemEditClick
}
/>
<
TableItemActionButtons
onDeleteClick=
{
onItemDeleteClick
}
onEditClick=
{
onItemEditClick
}
/>
...
...
ui/shared/AddressSnippet.tsx
View file @
baa20bff
...
@@ -6,16 +6,20 @@ import AddressIcon from 'ui/shared/address/AddressIcon';
...
@@ -6,16 +6,20 @@ import AddressIcon from 'ui/shared/address/AddressIcon';
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
AddressContractIcon
from
'
./address/AddressContractIcon
'
;
interface
Props
{
interface
Props
{
address
:
string
;
address
:
string
;
subtitle
?:
string
;
subtitle
?:
string
;
// temporary solution for custom abis while we don't have address info on account pages
isContract
?:
boolean
;
}
}
const
AddressSnippet
=
({
address
,
subtitle
}:
Props
)
=>
{
const
AddressSnippet
=
({
address
,
isContract
,
subtitle
}:
Props
)
=>
{
return
(
return
(
<
Box
maxW=
"100%"
>
<
Box
maxW=
"100%"
>
<
Address
>
<
Address
>
<
AddressIcon
hash=
{
address
}
/>
{
isContract
?
<
AddressContractIcon
/>
:
<
AddressIcon
hash=
{
address
}
/>
}
<
AddressLink
hash=
{
address
}
fontWeight=
"600"
ml=
{
2
}
/>
<
AddressLink
hash=
{
address
}
fontWeight=
"600"
ml=
{
2
}
/>
<
CopyToClipboard
text=
{
address
}
ml=
{
1
}
/>
<
CopyToClipboard
text=
{
address
}
ml=
{
1
}
/>
</
Address
>
</
Address
>
...
...
ui/shared/address/AddressContractIcon.tsx
0 → 100644
View file @
baa20bff
import
{
Box
,
chakra
,
Tooltip
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
type
Props
=
{
className
?:
string
;
}
const
AddressContractIcon
=
({
className
}:
Props
)
=>
{
return
(
<
Tooltip
label=
"Contract"
>
<
Box
className=
{
className
}
width=
"24px"
height=
"24px"
borderRadius=
"12px"
backgroundColor=
"gray.200"
color=
"gray.400"
display=
"inline-flex"
alignItems=
"center"
justifyContent=
"center"
fontWeight=
"700"
>
С
</
Box
>
</
Tooltip
>
);
};
export
default
chakra
(
AddressContractIcon
);
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