Skip to content

Commit

Permalink
Wallet txn activities (MystenLabs#7437)
Browse files Browse the repository at this point in the history
Wallet activities update. 
- Update  to match the latest design,
- I moved the from redux to react query
- Note (using the old icons)



https://user-images.githubusercontent.com/8676844/215287199-5e1d03fd-550b-41e0-a75b-4207d3bff043.mov


<img width="409" alt="Screenshot 2023-01-30 at 10 35 17 AM"
src="https://user-images.githubusercontent.com/8676844/215531395-1bb12f2a-8231-435a-9fa9-d1fd0b9a306a.png">

<img width="436" alt="Screenshot 2023-01-31 at 10 04 45 AM"
src="https://user-images.githubusercontent.com/8676844/215797180-8ce38727-278d-47d7-a058-e03e8dfff15c.png">
  • Loading branch information
Jibz1 authored Feb 3, 2023
1 parent bbbdbec commit 326ad64
Show file tree
Hide file tree
Showing 30 changed files with 1,197 additions and 607 deletions.
5 changes: 4 additions & 1 deletion apps/wallet/src/ui/app/components/nft-display/NftImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ const nftImageStyles = cva('overflow-hidden', {
borderRadius: {
md: 'rounded-md',
xl: 'rounded-xl',
sm: 'rounded',
},
size: {
xs: 'w-10 h-10',
sm: 'w-12 h-12',
md: 'w-36 h-36',
lg: 'w-44 h-44',
Expand All @@ -45,6 +47,7 @@ export interface NftImageProps extends VariantProps<typeof nftImageStyles> {
showLabel?: boolean;
}

//TODO: create a fallback image for broken images urls
export function NftImage({
src,
name,
Expand All @@ -63,7 +66,7 @@ export function NftImage({
{src ? (
<img
className={imgCls}
src={src}
src={src.replace(/^ipfs:\/\//, 'https://ipfs.io/ipfs/')}
alt={name || 'NFT'}
title={title}
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

import { TxnAddress } from '_components/receipt-card/TxnAddress';

export function DelegationObjectCard({
senderAddress,
}: {
senderAddress: string;
}) {
return <TxnAddress address={senderAddress} label="From" />;
}
240 changes: 0 additions & 240 deletions apps/wallet/src/ui/app/components/receipt-card/ReceiptCard.module.scss

This file was deleted.

25 changes: 25 additions & 0 deletions apps/wallet/src/ui/app/components/receipt-card/ReceiptCardBg.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

import cl from 'classnames';

import type { ReactNode } from 'react';

export function ReceiptCardBg({
status,
children,
}: {
status: boolean;
children: ReactNode;
}) {
return (
<div
className={cl(
"p-5 pb-0 rounded-t-lg flex flex-col item-center after:content-[''] after:bg-[url('_assets/images/receipt_bottom.svg')] after:w-[320px] after:h-5 after:ml-[-20px] after:top-4 after:-mt-6 after:relative divide-y divide-solid divide-steel/20 divide-x-0 gap-3.5",
status ? 'bg-success-light' : 'bg-issue-light'
)}
>
{children}
</div>
);
}
Loading

0 comments on commit 326ad64

Please sign in to comment.