-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dcellar-web-ui): introduce activities feature for bucket, object… (
#380) * feat(dcellar-web-ui): introduce activities feature for bucket, object and group * fix(dcellar-web-ui): text case error * refactor(dcellar-web-ui): the transfer in style & toolbox style * feat(dcellar-web-ui): add discord and release note link * feat(dcellar-web-ui): introduce the stop upload feature (#385) * feat(dcellar-web-ui): introduce the stop upload feature * fix(dcellar-web-ui): the uploading name text ellispsis * fix(dcellar-web-ui): change the stop status icon * feat(dcellar-web-ui): introduce activities feature for bucket, object and group * fix(dcellar-web-ui): text case error * refactor(dcellar-web-ui): the transfer in style & toolbox style * feat(dcellar-web-ui): add discord and release note link * feat(dcellar-web-ui): introduce the stop upload feature * refactor(dcellar-web-ui): remove rerandunt codes * docs(dcellar-web-ui): update changelog
- Loading branch information
Showing
30 changed files
with
750 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...r-web-ui/public/js/iconfont_v0.1.2.min.js → ...-web-ui/public/js/iconfont_v0.1.12.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import { GREENFIELD_CHAIN_EXPLORER_URL } from '@/base/env'; | ||
import { IconFont } from '@/components/IconFont'; | ||
import { CopyText } from '@/components/common/CopyText'; | ||
import { ListEmpty } from '@/components/common/DCTable/ListEmpty'; | ||
import { Activity } from '@/store/slices/object'; | ||
import { formatMsgType } from '@/utils/object'; | ||
import { trimAddress } from '@/utils/string'; | ||
import { formatFullTime } from '@/utils/time'; | ||
import { Box, Center, Flex, Link, Loading, Text } from '@node-real/uikit'; | ||
import { memo } from 'react'; | ||
|
||
interface ActivitiesProps { | ||
loading: boolean; | ||
activities: Activity[]; | ||
} | ||
|
||
export const Activities = memo<ActivitiesProps>(function Activities({ loading, activities }) { | ||
if (loading) return <Loading w={'100%'} my={24} size={24} />; | ||
if (!activities.length) | ||
return ( | ||
<ListEmpty | ||
empty | ||
h={240} | ||
type="empty-object" | ||
title="No Records" | ||
desc="There are no records at the moment." | ||
/> | ||
); | ||
|
||
return ( | ||
<> | ||
{activities.map((item, index) => ( | ||
<Flex key={index} gap={8}> | ||
<Flex flexDirection={'column'} alignItems={'center'}> | ||
<Center w={24} h={24} borderRadius={12} bgColor={'bg.bottom'} alignItems={'center'}> | ||
<IconFont type="object" w={16} h={16} /> | ||
</Center> | ||
{index < activities.length - 1 && ( | ||
<Box flex={1} width={1} bgColor={'readable.border'} /> | ||
)} | ||
</Flex> | ||
<Flex fontWeight={500} flexDirection={'column'} gap={8}> | ||
<Flex alignItems={'center'}> | ||
<Text as="span" color={'readable.tertiary'}> | ||
{formatMsgType(item.tx_result.type)} | ||
</Text> | ||
<Text as="span" color={'readable.normal'}> | ||
Transaction Hash | ||
</Text> | ||
( | ||
<Link | ||
color={'#1184EE'} | ||
_hover={{ color: '#3C9AF1' }} | ||
href={`${GREENFIELD_CHAIN_EXPLORER_URL}/tx/0x${item.hash}`} | ||
target="_blank" | ||
fontSize={12} | ||
textDecoration={'underline'} | ||
> | ||
0x{trimAddress(item.hash, 28, 6, 5)} | ||
</Link> | ||
) | ||
<CopyText value={`0x${item.hash}`} /> | ||
</Flex> | ||
<Flex gap={2} alignItems={'center'} mb={16} fontSize={12}> | ||
<IconFont type="calendar" w={16} h={16} /> | ||
<Text as="span" color={'readable.tertiary'}> | ||
{formatFullTime(item.time)} | ||
</Text> | ||
</Flex> | ||
</Flex> | ||
</Flex> | ||
))} | ||
{activities.length >= 100 && ( | ||
<Text textAlign={'center'} fontSize={12} color={'readable.tertiary'}> | ||
Only showing the latest 100 activities ~ | ||
</Text> | ||
)} | ||
</> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.