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
98ec03cd
Commit
98ec03cd
authored
Aug 24, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
withCopy to noCopy prop
parent
bd94c0ee
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
9 deletions
+8
-9
TransactionTagListItem.tsx
...rivateTags/TransactionTagTable/TransactionTagListItem.tsx
+1
-1
TransactionTagTableItem.tsx
...ivateTags/TransactionTagTable/TransactionTagTableItem.tsx
+1
-1
AddressEntity.tsx
ui/shared/entities/address/AddressEntity.tsx
+0
-1
components.tsx
ui/shared/entities/base/components.tsx
+3
-4
TokenEntity.tsx
ui/shared/entities/token/TokenEntity.tsx
+0
-1
TxEntity.pw.tsx
ui/shared/entities/tx/TxEntity.pw.tsx
+1
-1
TxEntity.tsx
ui/shared/entities/tx/TxEntity.tsx
+2
-0
No files found.
ui/privateTags/TransactionTagTable/TransactionTagListItem.tsx
View file @
98ec03cd
...
@@ -30,7 +30,7 @@ const TransactionTagListItem = ({ item, isLoading, onEditClick, onDeleteClick }:
...
@@ -30,7 +30,7 @@ const TransactionTagListItem = ({ item, isLoading, onEditClick, onDeleteClick }:
<
TxEntity
<
TxEntity
hash=
{
item
.
transaction_hash
}
hash=
{
item
.
transaction_hash
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
withCopy
noCopy=
{
false
}
fontWeight=
{
600
}
fontWeight=
{
600
}
maxW=
"100%"
maxW=
"100%"
/>
/>
...
...
ui/privateTags/TransactionTagTable/TransactionTagTableItem.tsx
View file @
98ec03cd
...
@@ -32,8 +32,8 @@ const TransactionTagTableItem = ({ item, isLoading, onEditClick, onDeleteClick }
...
@@ -32,8 +32,8 @@ const TransactionTagTableItem = ({ item, isLoading, onEditClick, onDeleteClick }
<
TxEntity
<
TxEntity
hash=
{
item
.
transaction_hash
}
hash=
{
item
.
transaction_hash
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
noCopy=
{
false
}
fontWeight=
{
600
}
fontWeight=
{
600
}
withCopy
/>
/>
</
Td
>
</
Td
>
<
Td
>
<
Td
>
...
...
ui/shared/entities/address/AddressEntity.tsx
View file @
98ec03cd
...
@@ -101,7 +101,6 @@ const Copy = (props: CopyProps) => {
...
@@ -101,7 +101,6 @@ const Copy = (props: CopyProps) => {
<
EntityBase
.
Copy
<
EntityBase
.
Copy
{
...
props
}
{
...
props
}
text=
{
props
.
address
.
hash
}
text=
{
props
.
address
.
hash
}
withCopy=
{
props
.
withCopy
??
true
}
/>
/>
);
);
};
};
...
...
ui/shared/entities/base/components.tsx
View file @
98ec03cd
...
@@ -24,8 +24,7 @@ export interface EntityBaseProps {
...
@@ -24,8 +24,7 @@ export interface EntityBaseProps {
href
?:
string
;
href
?:
string
;
query
?:
Record
<
string
,
string
>
;
query
?:
Record
<
string
,
string
>
;
noIcon
?:
boolean
;
noIcon
?:
boolean
;
// TODO @tom2drum rename to noCopy
noCopy
?:
boolean
;
withCopy
?:
boolean
;
tailLength
?:
number
;
tailLength
?:
number
;
truncation
?:
Truncation
;
truncation
?:
Truncation
;
}
}
...
@@ -133,10 +132,10 @@ const Content = chakra(({ className, isLoading, asProp, text, truncation = 'dyna
...
@@ -133,10 +132,10 @@ const Content = chakra(({ className, isLoading, asProp, text, truncation = 'dyna
);
);
});
});
export
type
CopyBaseProps
=
Pick
<
CopyToClipboardProps
,
'
isLoading
'
|
'
text
'
>
&
Pick
<
EntityBaseProps
,
'
with
Copy
'
>
;
export
type
CopyBaseProps
=
Pick
<
CopyToClipboardProps
,
'
isLoading
'
|
'
text
'
>
&
Pick
<
EntityBaseProps
,
'
no
Copy
'
>
;
const
Copy
=
(
props
:
CopyBaseProps
)
=>
{
const
Copy
=
(
props
:
CopyBaseProps
)
=>
{
if
(
!
props
.
with
Copy
)
{
if
(
props
.
no
Copy
)
{
return
null
;
return
null
;
}
}
...
...
ui/shared/entities/token/TokenEntity.tsx
View file @
98ec03cd
...
@@ -122,7 +122,6 @@ const Copy = (props: CopyProps) => {
...
@@ -122,7 +122,6 @@ const Copy = (props: CopyProps) => {
<
EntityBase
.
Copy
<
EntityBase
.
Copy
{
...
props
}
{
...
props
}
text=
{
props
.
token
.
address
}
text=
{
props
.
token
.
address
}
withCopy=
{
props
.
withCopy
??
true
}
/>
/>
);
);
};
};
...
...
ui/shared/entities/tx/TxEntity.pw.tsx
View file @
98ec03cd
...
@@ -58,7 +58,7 @@ test('with copy +@dark-mode', async({ mount }) => {
...
@@ -58,7 +58,7 @@ test('with copy +@dark-mode', async({ mount }) => {
<
TestApp
>
<
TestApp
>
<
TxEntity
<
TxEntity
hash=
{
hash
}
hash=
{
hash
}
withCopy
noCopy=
{
false
}
/>
/>
</
TestApp
>,
</
TestApp
>,
);
);
...
...
ui/shared/entities/tx/TxEntity.tsx
View file @
98ec03cd
...
@@ -56,6 +56,8 @@ const Copy = (props: CopyProps) => {
...
@@ -56,6 +56,8 @@ const Copy = (props: CopyProps) => {
<
EntityBase
.
Copy
<
EntityBase
.
Copy
{
...
props
}
{
...
props
}
text=
{
props
.
hash
}
text=
{
props
.
hash
}
// by default we don't show copy icon, maybe this should be revised
noCopy=
{
props
.
noCopy
??
true
}
/>
/>
);
);
};
};
...
...
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