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
d67a2793
Commit
d67a2793
authored
Dec 16, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable animation for list item on mobile where it is not needed
parent
7a9b51a5
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
40 additions
and
41 deletions
+40
-41
AddressBlocksValidatedListItem.tsx
...ddress/blocksValidated/AddressBlocksValidatedListItem.tsx
+3
-3
AddressCoinBalanceListItem.tsx
ui/address/coinBalance/AddressCoinBalanceListItem.tsx
+3
-3
ApiKeyListItem.tsx
ui/apiKey/ApiKeyTable/ApiKeyListItem.tsx
+3
-3
BlocksListItem.tsx
ui/blocks/BlocksListItem.tsx
+3
-3
CustomAbiListItem.tsx
ui/customAbi/CustomAbiTable/CustomAbiListItem.tsx
+3
-3
AddressTagListItem.tsx
ui/privateTags/AddressTagTable/AddressTagListItem.tsx
+3
-3
TransactionTagListItem.tsx
...rivateTags/TransactionTagTable/TransactionTagListItem.tsx
+3
-3
PublicTagListItem.tsx
ui/publicTags/PublicTagTable/PublicTagListItem.tsx
+3
-3
ListItemMobile.tsx
ui/shared/ListItemMobile.tsx
+4
-5
TokenTransferListItem.tsx
ui/shared/TokenTransfer/TokenTransferListItem.tsx
+3
-3
TxInternalsListItem.tsx
ui/tx/internals/TxInternalsListItem.tsx
+3
-3
TxStateListItem.tsx
ui/tx/state/TxStateListItem.tsx
+3
-3
WatchListItem.tsx
ui/watchlist/WatchlistTable/WatchListItem.tsx
+3
-3
No files found.
ui/address/blocksValidated/AddressBlocksValidatedListItem.tsx
View file @
d67a2793
...
...
@@ -8,7 +8,7 @@ import appConfig from 'configs/app/config';
import
getBlockTotalReward
from
'
lib/block/getBlockTotalReward
'
;
import
useTimeAgoIncrement
from
'
lib/hooks/useTimeAgoIncrement
'
;
import
link
from
'
lib/link/link
'
;
import
AccountListItemMobile
from
'
ui/shared/Account
ListItemMobile
'
;
import
ListItemMobile
from
'
ui/shared/
ListItemMobile
'
;
import
Utilization
from
'
ui/shared/Utilization/Utilization
'
;
type
Props
=
Block
&
{
...
...
@@ -21,7 +21,7 @@ const AddressBlocksValidatedListItem = (props: Props) => {
const
totalReward
=
getBlockTotalReward
(
props
);
return
(
<
AccountListItemMobile
rowGap=
{
2
}
>
<
ListItemMobile
rowGap=
{
2
}
isAnimated
>
<
Flex
justifyContent=
"space-between"
w=
"100%"
>
<
Link
href=
{
blockUrl
}
fontWeight=
"700"
>
{
props
.
height
}
</
Link
>
<
Text
variant=
"secondary"
>
{
timeAgo
}
</
Text
>
...
...
@@ -39,7 +39,7 @@ const AddressBlocksValidatedListItem = (props: Props) => {
<
Text
fontWeight=
{
500
}
flexShrink=
{
0
}
>
Reward
{
appConfig
.
network
.
currency
.
symbol
}
</
Text
>
<
Text
variant=
"secondary"
>
{
totalReward
}
</
Text
>
</
Flex
>
</
Account
ListItemMobile
>
</
ListItemMobile
>
);
};
...
...
ui/address/coinBalance/AddressCoinBalanceListItem.tsx
View file @
d67a2793
...
...
@@ -8,9 +8,9 @@ import appConfig from 'configs/app/config';
import
{
WEI
,
ZERO
}
from
'
lib/consts
'
;
import
useTimeAgoIncrement
from
'
lib/hooks/useTimeAgoIncrement
'
;
import
link
from
'
lib/link/link
'
;
import
AccountListItemMobile
from
'
ui/shared/AccountListItemMobile
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile
'
;
type
Props
=
AddressCoinBalanceHistoryItem
&
{
page
:
number
;
...
...
@@ -23,7 +23,7 @@ const AddressCoinBalanceListItem = (props: Props) => {
const
timeAgo
=
useTimeAgoIncrement
(
props
.
block_timestamp
,
props
.
page
===
1
);
return
(
<
AccountListItemMobile
rowGap=
{
2
}
>
<
ListItemMobile
rowGap=
{
2
}
isAnimated
>
<
Flex
justifyContent=
"space-between"
w=
"100%"
>
<
Text
fontWeight=
{
600
}
>
{
BigNumber
(
props
.
value
).
div
(
WEI
).
toFixed
(
8
)
}
{
appConfig
.
network
.
currency
.
symbol
}
</
Text
>
<
Stat
flexGrow=
"0"
>
...
...
@@ -51,7 +51,7 @@ const AddressCoinBalanceListItem = (props: Props) => {
<
Text
fontWeight=
{
500
}
flexShrink=
{
0
}
>
Age
</
Text
>
<
Text
variant=
"secondary"
>
{
timeAgo
}
</
Text
>
</
Flex
>
</
Account
ListItemMobile
>
</
ListItemMobile
>
);
};
...
...
ui/apiKey/ApiKeyTable/ApiKeyListItem.tsx
View file @
d67a2793
...
...
@@ -2,8 +2,8 @@ import React, { useCallback } from 'react';
import
type
{
ApiKey
}
from
'
types/api/account
'
;
import
AccountListItemMobile
from
'
ui/shared/AccountListItemMobile
'
;
import
ApiKeySnippet
from
'
ui/shared/ApiKeySnippet
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile
'
;
import
TableItemActionButtons
from
'
ui/shared/TableItemActionButtons
'
;
interface
Props
{
...
...
@@ -23,10 +23,10 @@ const ApiKeyListItem = ({ item, onEditClick, onDeleteClick }: Props) => {
},
[
item
,
onDeleteClick
]);
return
(
<
Account
ListItemMobile
>
<
ListItemMobile
>
<
ApiKeySnippet
apiKey=
{
item
.
api_key
}
name=
{
item
.
name
}
/>
<
TableItemActionButtons
onDeleteClick=
{
onItemDeleteClick
}
onEditClick=
{
onItemEditClick
}
/>
</
Account
ListItemMobile
>
</
ListItemMobile
>
);
};
...
...
ui/blocks/BlocksListItem.tsx
View file @
d67a2793
...
...
@@ -12,9 +12,9 @@ import { WEI } from 'lib/consts';
import
link
from
'
lib/link/link
'
;
import
getNetworkValidatorTitle
from
'
lib/networks/getNetworkValidatorTitle
'
;
import
BlockTimestamp
from
'
ui/blocks/BlockTimestamp
'
;
import
AccountListItemMobile
from
'
ui/shared/AccountListItemMobile
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
GasUsedToTargetRatio
from
'
ui/shared/GasUsedToTargetRatio
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile
'
;
import
Utilization
from
'
ui/shared/Utilization/Utilization
'
;
interface
Props
{
...
...
@@ -29,7 +29,7 @@ const BlocksListItem = ({ data, isPending, enableTimeIncrement }: Props) => {
const
txFees
=
BigNumber
(
data
.
tx_fees
||
0
);
return
(
<
AccountListItemMobile
rowGap=
{
3
}
key=
{
String
(
data
.
height
)
}
>
<
ListItemMobile
rowGap=
{
3
}
key=
{
String
(
data
.
height
)
}
isAnimated
>
<
Flex
justifyContent=
"space-between"
w=
"100%"
>
<
Flex
columnGap=
{
2
}
alignItems=
"center"
>
{
isPending
&&
<
Spinner
size=
"sm"
/>
}
...
...
@@ -76,7 +76,7 @@ const BlocksListItem = ({ data, isPending, enableTimeIncrement }: Props) => {
<
Utilization
ml=
{
4
}
value=
{
burntFees
.
div
(
txFees
).
toNumber
()
}
/>
</
Flex
>
</
Box
>
</
Account
ListItemMobile
>
</
ListItemMobile
>
);
};
...
...
ui/customAbi/CustomAbiTable/CustomAbiListItem.tsx
View file @
d67a2793
...
...
@@ -2,8 +2,8 @@ import React, { useCallback } from 'react';
import
type
{
CustomAbi
}
from
'
types/api/account
'
;
import
AccountListItemMobile
from
'
ui/shared/AccountListItemMobile
'
;
import
AddressSnippet
from
'
ui/shared/AddressSnippet
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile
'
;
import
TableItemActionButtons
from
'
ui/shared/TableItemActionButtons
'
;
interface
Props
{
...
...
@@ -23,10 +23,10 @@ const CustomAbiListItem = ({ item, onEditClick, onDeleteClick }: Props) => {
},
[
item
,
onDeleteClick
]);
return
(
<
Account
ListItemMobile
>
<
ListItemMobile
>
<
AddressSnippet
address=
{
item
.
contract_address_hash
}
subtitle=
{
item
.
name
}
isContract
/>
<
TableItemActionButtons
onDeleteClick=
{
onItemDeleteClick
}
onEditClick=
{
onItemEditClick
}
/>
</
Account
ListItemMobile
>
</
ListItemMobile
>
);
};
...
...
ui/privateTags/AddressTagTable/AddressTagListItem.tsx
View file @
d67a2793
...
...
@@ -3,8 +3,8 @@ import React, { useCallback } from 'react';
import
type
{
AddressTag
}
from
'
types/api/account
'
;
import
AccountListItemMobile
from
'
ui/shared/AccountListItemMobile
'
;
import
AddressSnippet
from
'
ui/shared/AddressSnippet
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile
'
;
import
TableItemActionButtons
from
'
ui/shared/TableItemActionButtons
'
;
interface
Props
{
...
...
@@ -23,7 +23,7 @@ const AddressTagListItem = ({ item, onEditClick, onDeleteClick }: Props) => {
},
[
item
,
onDeleteClick
]);
return
(
<
Account
ListItemMobile
>
<
ListItemMobile
>
<
Flex
alignItems=
"flex-start"
flexDirection=
"column"
maxW=
"100%"
>
<
AddressSnippet
address=
{
item
.
address_hash
}
/>
<
HStack
spacing=
{
3
}
mt=
{
4
}
>
...
...
@@ -34,7 +34,7 @@ const AddressTagListItem = ({ item, onEditClick, onDeleteClick }: Props) => {
</
HStack
>
</
Flex
>
<
TableItemActionButtons
onDeleteClick=
{
onItemDeleteClick
}
onEditClick=
{
onItemEditClick
}
/>
</
Account
ListItemMobile
>
</
ListItemMobile
>
);
};
...
...
ui/privateTags/TransactionTagTable/TransactionTagListItem.tsx
View file @
d67a2793
...
...
@@ -3,7 +3,7 @@ import React, { useCallback } from 'react';
import
type
{
TransactionTag
}
from
'
types/api/account
'
;
import
AccountListItemMobile
from
'
ui/shared/Account
ListItemMobile
'
;
import
ListItemMobile
from
'
ui/shared/
ListItemMobile
'
;
import
TableItemActionButtons
from
'
ui/shared/TableItemActionButtons
'
;
import
TransactionSnippet
from
'
ui/shared/TransactionSnippet
'
;
...
...
@@ -23,7 +23,7 @@ const TransactionTagListItem = ({ item, onEditClick, onDeleteClick }: Props) =>
},
[
item
,
onDeleteClick
]);
return
(
<
Account
ListItemMobile
>
<
ListItemMobile
>
<
Flex
alignItems=
"flex-start"
flexDirection=
"column"
maxW=
"100%"
>
<
TransactionSnippet
hash=
{
item
.
transaction_hash
}
/>
<
HStack
spacing=
{
3
}
mt=
{
4
}
>
...
...
@@ -34,7 +34,7 @@ const TransactionTagListItem = ({ item, onEditClick, onDeleteClick }: Props) =>
</
HStack
>
</
Flex
>
<
TableItemActionButtons
onDeleteClick=
{
onItemDeleteClick
}
onEditClick=
{
onItemEditClick
}
/>
</
Account
ListItemMobile
>
</
ListItemMobile
>
);
};
...
...
ui/publicTags/PublicTagTable/PublicTagListItem.tsx
View file @
d67a2793
...
...
@@ -3,8 +3,8 @@ import React, { useCallback } from 'react';
import
type
{
PublicTag
}
from
'
types/api/account
'
;
import
AccountListItemMobile
from
'
ui/shared/AccountListItemMobile
'
;
import
AddressSnippet
from
'
ui/shared/AddressSnippet
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile
'
;
import
TableItemActionButtons
from
'
ui/shared/TableItemActionButtons
'
;
import
TruncatedTextTooltip
from
'
ui/shared/TruncatedTextTooltip
'
;
...
...
@@ -24,7 +24,7 @@ const PublicTagListItem = ({ item, onEditClick, onDeleteClick }: Props) => {
},
[
item
,
onDeleteClick
]);
return
(
<
Account
ListItemMobile
>
<
ListItemMobile
>
<
VStack
spacing=
{
3
}
alignItems=
"flex-start"
maxW=
"100%"
>
<
VStack
spacing=
{
4
}
alignItems=
"unset"
maxW=
"100%"
>
{
item
.
addresses
.
map
((
address
)
=>
<
AddressSnippet
key=
{
address
}
address=
{
address
}
/>)
}
...
...
@@ -49,7 +49,7 @@ const PublicTagListItem = ({ item, onEditClick, onDeleteClick }: Props) => {
</
HStack
>
</
VStack
>
<
TableItemActionButtons
onDeleteClick=
{
onItemDeleteClick
}
onEditClick=
{
onItemEditClick
}
/>
</
Account
ListItemMobile
>
</
ListItemMobile
>
);
};
...
...
ui/shared/
Account
ListItemMobile.tsx
→
ui/shared/ListItemMobile.tsx
View file @
d67a2793
...
...
@@ -5,18 +5,17 @@ import React from 'react';
interface
Props
{
children
:
React
.
ReactNode
;
className
?:
string
;
key
?:
string
;
isAnimated
?:
boolean
;
}
const
AccountListItemMobile
=
({
children
,
className
,
key
}:
Props
)
=>
{
const
ListItemMobile
=
({
children
,
className
,
isAnimated
}:
Props
)
=>
{
return
(
<
Flex
as=
{
motion
.
div
}
initial=
{
{
opacity
:
0
,
scale
:
0.97
}
}
initial=
{
isAnimated
?
{
opacity
:
0
,
scale
:
0.97
}
:
{
opacity
:
1
,
scale
:
1
}
}
animate=
{
{
opacity
:
1
,
scale
:
1
}
}
transitionDuration=
"normal"
transitionTimingFunction=
"linear"
key=
{
key
}
rowGap=
{
6
}
alignItems=
"flex-start"
flexDirection=
"column"
...
...
@@ -33,4 +32,4 @@ const AccountListItemMobile = ({ children, className, key }: Props) => {
);
};
export
default
chakra
(
Account
ListItemMobile
);
export
default
chakra
(
ListItemMobile
);
ui/shared/TokenTransfer/TokenTransferListItem.tsx
View file @
d67a2793
...
...
@@ -5,12 +5,12 @@ import React from 'react';
import
type
{
TokenTransfer
}
from
'
types/api/tokenTransfer
'
;
import
eastArrowIcon
from
'
icons/arrows/east.svg
'
;
import
AccountListItemMobile
from
'
ui/shared/AccountListItemMobile
'
;
import
AdditionalInfoButton
from
'
ui/shared/AdditionalInfoButton
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
InOutTag
from
'
ui/shared/InOutTag
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile
'
;
import
TokenSnippet
from
'
ui/shared/TokenSnippet/TokenSnippet
'
;
import
{
getTokenTransferTypeText
}
from
'
ui/shared/TokenTransfer/helpers
'
;
import
TokenTransferNft
from
'
ui/shared/TokenTransfer/TokenTransferNft
'
;
...
...
@@ -31,7 +31,7 @@ const TokenTransferListItem = ({ token, total, tx_hash: txHash, from, to, baseAd
const
addressWidth
=
`calc((100% -
${
baseAddress
?
'
50px
'
:
'
0px
'
}
) / 2)`
;
return
(
<
AccountListItemMobile
rowGap=
{
3
}
>
<
ListItemMobile
rowGap=
{
3
}
isAnimated
>
<
Flex
w=
"100%"
flexWrap=
"wrap"
rowGap=
{
1
}
position=
"relative"
>
<
TokenSnippet
hash=
{
token
.
address
}
w=
"auto"
maxW=
"calc(100% - 140px)"
name=
{
token
.
name
||
'
Unnamed token
'
}
/>
<
Tag
flexShrink=
{
0
}
ml=
{
2
}
mr=
{
2
}
>
{
token
.
type
}
</
Tag
>
...
...
@@ -67,7 +67,7 @@ const TokenTransferListItem = ({ token, total, tx_hash: txHash, from, to, baseAd
<
Text
variant=
"secondary"
>
{
value
}
</
Text
>
</
Flex
>
)
}
</
Account
ListItemMobile
>
</
ListItemMobile
>
);
};
...
...
ui/tx/internals/TxInternalsListItem.tsx
View file @
d67a2793
...
...
@@ -6,10 +6,10 @@ import type { InternalTransaction } from 'types/api/internalTransaction';
import
appConfig
from
'
configs/app/config
'
;
import
eastArrowIcon
from
'
icons/arrows/east.svg
'
;
import
AccountListItemMobile
from
'
ui/shared/AccountListItemMobile
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile
'
;
import
TxStatus
from
'
ui/shared/TxStatus
'
;
import
{
TX_INTERNALS_ITEMS
}
from
'
ui/tx/internals/utils
'
;
...
...
@@ -20,7 +20,7 @@ const TxInternalsListItem = ({ type, from, to, value, success, error, gas_limit:
const
toData
=
to
?
to
:
createdContract
;
return
(
<
Account
ListItemMobile
rowGap=
{
3
}
>
<
ListItemMobile
rowGap=
{
3
}
>
<
Flex
>
{
typeTitle
&&
<
Tag
colorScheme=
"cyan"
mr=
{
2
}
>
{
typeTitle
}
</
Tag
>
}
<
TxStatus
status=
{
success
?
'
ok
'
:
'
error
'
}
errorText=
{
error
}
/>
...
...
@@ -46,7 +46,7 @@ const TxInternalsListItem = ({ type, from, to, value, success, error, gas_limit:
<
Text
fontSize=
"sm"
fontWeight=
{
500
}
>
Gas limit
</
Text
>
<
Text
fontSize=
"sm"
variant=
"secondary"
>
{
BigNumber
(
gasLimit
).
toFormat
()
}
</
Text
>
</
HStack
>
</
Account
ListItemMobile
>
</
ListItemMobile
>
);
};
...
...
ui/tx/state/TxStateListItem.tsx
View file @
d67a2793
...
...
@@ -8,10 +8,10 @@ import appConfig from 'configs/app/config';
import
type
{
data
}
from
'
data/txState
'
;
import
{
nbsp
}
from
'
lib/html-entities
'
;
import
getNetworkValidatorTitle
from
'
lib/networks/getNetworkValidatorTitle
'
;
import
AccountListItemMobile
from
'
ui/shared/AccountListItemMobile
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile
'
;
import
TxStateStorageItem
from
'
./TxStateStorageItem
'
;
...
...
@@ -22,7 +22,7 @@ const TxStateListItem = ({ storage, address, miner, after, before, diff }: Props
const
hasStorageData
=
Boolean
(
storage
?.
length
);
return
(
<
Account
ListItemMobile
>
<
ListItemMobile
>
<
AccordionItem
isDisabled=
{
!
hasStorageData
}
border=
{
0
}
w=
"100%"
display=
"flex"
flexDirection=
"column"
>
{
({
isExpanded
})
=>
(
<>
...
...
@@ -94,7 +94,7 @@ const TxStateListItem = ({ storage, address, miner, after, before, diff }: Props
</>
)
}
</
AccordionItem
>
</
Account
ListItemMobile
>
</
ListItemMobile
>
);
};
...
...
ui/watchlist/WatchlistTable/WatchListItem.tsx
View file @
d67a2793
...
...
@@ -6,7 +6,7 @@ import type { TWatchlistItem } from 'types/client/account';
import
useFetch
from
'
lib/hooks/useFetch
'
;
import
useToast
from
'
lib/hooks/useToast
'
;
import
AccountListItemMobile
from
'
ui/shared/Account
ListItemMobile
'
;
import
ListItemMobile
from
'
ui/shared/
ListItemMobile
'
;
import
TableItemActionButtons
from
'
ui/shared/TableItemActionButtons
'
;
import
WatchListAddressItem
from
'
./WatchListAddressItem
'
;
...
...
@@ -79,7 +79,7 @@ const WatchListItem = ({ item, onEditClick, onDeleteClick }: Props) => {
},
[
mutate
]);
return
(
<
Account
ListItemMobile
>
<
ListItemMobile
>
<
Box
maxW=
"100%"
>
<
WatchListAddressItem
item=
{
item
}
/>
<
HStack
spacing=
{
3
}
mt=
{
6
}
>
...
...
@@ -103,7 +103,7 @@ const WatchListItem = ({ item, onEditClick, onDeleteClick }: Props) => {
</
HStack
>
<
TableItemActionButtons
onDeleteClick=
{
onItemDeleteClick
}
onEditClick=
{
onItemEditClick
}
/>
</
Flex
>
</
Account
ListItemMobile
>
</
ListItemMobile
>
);
};
...
...
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