Skip to content

Commit

Permalink
fix: minor layout improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
siandreev committed Dec 12, 2024
1 parent 11cf4c9 commit 1a494b2
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 65 deletions.
40 changes: 21 additions & 19 deletions packages/uikit/src/components/create/AddWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,25 +165,27 @@ export const AddWalletContent: FC<{ onSelect: (path: AddWalletMethod) => void }>
</AddMethodText>
<RightIconStyled />
</AddMethod>
{canAddMultisig && !hideMultisig && (
<AddMethod onClick={() => onSelect('multisig')}>
<ButtonIcon>
<WalletPencilIcon />
</ButtonIcon>
<AddMethodText>
<AddMethodLabel>
{t('add_wallet_new_multisig_title')}{' '}
<HideOnReview>
<Badge color="accentBlue">PRO</Badge>
</HideOnReview>
</AddMethodLabel>
<AddMethodDescription>
{t('add_wallet_new_multisig_description')}
</AddMethodDescription>
</AddMethodText>
<RightIconStyled />
</AddMethod>
)}
<HideOnReview>
{canAddMultisig && !hideMultisig && (
<AddMethod onClick={() => onSelect('multisig')}>
<ButtonIcon>
<WalletPencilIcon />
</ButtonIcon>
<AddMethodText>
<AddMethodLabel>
{t('add_wallet_new_multisig_title')}{' '}
<HideOnReview>
<Badge color="accentBlue">PRO</Badge>
</HideOnReview>
</AddMethodLabel>
<AddMethodDescription>
{t('add_wallet_new_multisig_description')}
</AddMethodDescription>
</AddMethodText>
<RightIconStyled />
</AddMethod>
)}
</HideOnReview>
<AddMethod onClick={() => onSelect('testnet')}>
<ButtonIcon>
<WalletTestnetIcon />
Expand Down
41 changes: 21 additions & 20 deletions packages/uikit/src/components/desktop/aside/WalletAsideMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,16 @@ export const WalletAsideMenu = () => {
</AsideMenuItemStyled>
)}
</NavLink>

<NavLink to={AppRoute.purchases}>
{({ isActive }) => (
<AsideMenuItemStyled isSelected={isActive}>
<SaleBadgeIcon />
<Label2>{t('wallet_aside_collectibles')}</Label2>
</AsideMenuItemStyled>
)}
</NavLink>
<HideOnReview>
<NavLink to={AppRoute.purchases}>
{({ isActive }) => (
<AsideMenuItemStyled isSelected={isActive}>
<SaleBadgeIcon />
<Label2>{t('wallet_aside_collectibles')}</Label2>
</AsideMenuItemStyled>
)}
</NavLink>
<NavLink to={AppRoute.dns}>
{({ isActive }) => (
<AsideMenuItemStyled isSelected={isActive}>
Expand All @@ -123,19 +124,19 @@ export const WalletAsideMenu = () => {
)}
</NavLink>
)}
{isMultisig && !isTestnet && <MultisigOrdersMenuItem />}
{showMultisigs && !isTestnet && (
<NavLink to={AppRoute.multisigWallets}>
{({ isActive }) => (
<AsideMenuItemStyled isSelected={isActive}>
<ListIcon />
<Label2>{t('wallet_aside_multisig_wallets')}</Label2>
</AsideMenuItemStyled>
)}
</NavLink>
)}
{canUseBattery && <BatterySettingsListItem />}
</HideOnReview>
{isMultisig && !isTestnet && <MultisigOrdersMenuItem />}
{showMultisigs && !isTestnet && (
<NavLink to={AppRoute.multisigWallets}>
{({ isActive }) => (
<AsideMenuItemStyled isSelected={isActive}>
<ListIcon />
<Label2>{t('wallet_aside_multisig_wallets')}</Label2>
</AsideMenuItemStyled>
)}
</NavLink>
)}
<HideOnReview>{canUseBattery && <BatterySettingsListItem />}</HideOnReview>
<NavLink to={AppRoute.walletSettings} end>
{({ isActive }) => (
<AsideMenuItemStyled isSelected={isActive}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,16 @@ const DesktopWalletHeaderPayload = () => {
{t('wallet_send')}
</ButtonStyled>
)}
{!isReadOnly && isStandardTonWallet(activeWallet) && (
<LinkStyled to={AppProRoute.multiSend}>
<ButtonStyled size="small">
<ArrowUpIcon />
{t('wallet_multi_send')}
</ButtonStyled>
</LinkStyled>
)}
<HideOnReview>
{!isReadOnly && isStandardTonWallet(activeWallet) && (
<LinkStyled to={AppProRoute.multiSend}>
<ButtonStyled size="small">
<ArrowUpIcon />
{t('wallet_multi_send')}
</ButtonStyled>
</LinkStyled>
)}
</HideOnReview>
<ButtonStyled
size="small"
onClick={() => {
Expand Down
27 changes: 15 additions & 12 deletions packages/uikit/src/components/nft/NftAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { Body2 } from '../Text';
import { Button } from '../fields/Button';
import { LinkNft } from './LinkNft';
import { RenewNft } from './RenewNft';
import { HideOnReview } from '../ios/HideOnReview';

const getMarketplaceUrl = (nftItem: NftItem) => {
const { marketplace } = nftItem.metadata;
Expand All @@ -29,18 +30,20 @@ const ViewOnMarketButton: FC<{ url: string }> = ({ url }) => {
const sdk = useAppSdk();

return (
<Button
size="large"
secondary
fullWidth
onClick={e => {
e.preventDefault();
e.stopPropagation();
sdk.openPage(url);
}}
>
{t('nft_open_in_marketplace')}
</Button>
<HideOnReview>
<Button
size="large"
secondary
fullWidth
onClick={e => {
e.preventDefault();
e.stopPropagation();
sdk.openPage(url);
}}
>
{t('nft_open_in_marketplace')}
</Button>
</HideOnReview>
);
};
const ActionTransfer: FC<{
Expand Down
7 changes: 1 addition & 6 deletions packages/uikit/src/desktop-pages/nft/DesktopCollectables.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { useMemo } from 'react';
import { SlidersIcon } from '../../components/Icon';
import { IconButtonTransparentBackground } from '../../components/fields/IconButton';
import { useWalletFilteredNftList } from '../../state/nft';
import { HideOnReview } from '../../components/ios/HideOnReview';

const gap = '10px';
const maxColumnsNumber = 4;
Expand Down Expand Up @@ -72,11 +71,7 @@ const SettingsButtonStyled = styled(IconButtonTransparentBackground)`
`;

export const DesktopCollectables = () => {
return (
<HideOnReview>
<DesktopCollectablesContent />
</HideOnReview>
);
return <DesktopCollectablesContent />;
};

export const DesktopCollectablesContent = () => {
Expand Down

0 comments on commit 1a494b2

Please sign in to comment.