Skip to content

Commit da51e26

Browse files
authored
fix: design tweaks PR (#2327)
1 parent 0c19459 commit da51e26

16 files changed

+76
-255
lines changed

apps/namadillo/src/App/AccountOverview/UnshieldedAssetTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ const TransparentTokensTable = ({
112112
<div className="relative group/tooltip">
113113
<ActionButton
114114
size="xs"
115-
href={`${routes.shield}?${params.asset}=${asset.symbol}&${params.source}=${destinationAddress}&${params.destination}=${shieldedAddress}`}
115+
href={`${routes.transfer}?${params.asset}=${asset.symbol}&${params.source}=${destinationAddress}&${params.destination}=${shieldedAddress}`}
116116
>
117117
Shield
118118
</ActionButton>
@@ -135,7 +135,7 @@ const TransparentTokensTable = ({
135135
<span className="text-xs">NAM Transfer Locked</span>
136136
: [
137137
{
138-
url: `${routes.transfer}?${params.asset}=${address}&${params.shielded}=0`,
138+
url: `${routes.transfer}?${params.asset}=${asset.symbol}&${params.source}=${destinationAddress}`,
139139
icon: <IoSwapHorizontal className="h-[20px] w-[20px]" />,
140140
},
141141
].map(({ url, icon }) => (

apps/namadillo/src/App/Ibc/IbcTopHeader.tsx

Lines changed: 0 additions & 47 deletions
This file was deleted.

apps/namadillo/src/App/Ibc/IbcTransfer.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { useEffect, useMemo, useState } from "react";
1919
import { generatePath, useNavigate } from "react-router-dom";
2020
import { AssetWithAmountAndChain } from "types";
2121
import { useTransactionEventListener } from "utils";
22-
import { IbcTopHeader } from "./IbcTopHeader";
2322

2423
interface IbcTransferProps {
2524
sourceAddress: string;
@@ -146,9 +145,7 @@ export const IbcTransfer = ({
146145

147146
return (
148147
<div className="relative min-h-[600px]">
149-
<header className="flex flex-col items-center text-center mb-8 gap-6">
150-
<IbcTopHeader type="ibcToNam" isShielded={shielded} />
151-
</header>
148+
<header className="text-center mb-8 gap-6">IBC Deposit</header>
152149
<TransferModule
153150
source={{
154151
selectedAssetWithAmount,

apps/namadillo/src/App/Ibc/IbcWithdraw.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ import {
4444
toDisplayAmount,
4545
useTransactionEventListener,
4646
} from "utils";
47-
import { IbcTopHeader } from "./IbcTopHeader";
4847

4948
interface IbcWithdrawProps {
5049
sourceAddress: string;
@@ -323,9 +322,7 @@ export const IbcWithdraw = ({
323322

324323
return (
325324
<div className="relative min-h-[600px]">
326-
<header className="flex flex-col items-center text-center mb-8 gap-6">
327-
<IbcTopHeader type="namToIbc" isShielded={shielded} />
328-
</header>
325+
<header className="text-center mb-8 gap-6">IBC Withdraw</header>
329326
<TransferModule
330327
source={{
331328
address: sourceAddress,

apps/namadillo/src/App/Icons/ReceiveIcon.tsx

Lines changed: 0 additions & 52 deletions
This file was deleted.

apps/namadillo/src/App/Icons/TransferIcon.tsx

Lines changed: 0 additions & 27 deletions
This file was deleted.

apps/namadillo/src/App/Layout/Navigation.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
import { SidebarMenuItem } from "App/Common/SidebarMenuItem";
2-
import { ReceiveIcon } from "App/Icons/ReceiveIcon";
32
import { ShieldIcon } from "App/Icons/ShieldIcon";
4-
import { TransferIcon } from "App/Icons/TransferIcon";
53
import { routes } from "App/routes";
64
import { applicationFeaturesAtom } from "atoms/settings";
75
import { useAtomValue } from "jotai";
86
import { AiFillHome } from "react-icons/ai";
97
import { BsDiscord, BsTwitterX } from "react-icons/bs";
108
import { FaVoteYea } from "react-icons/fa";
119
import { FaBug } from "react-icons/fa6";
12-
import { GoStack } from "react-icons/go";
13-
import { MdOutlineKeyboardBackspace } from "react-icons/md";
10+
import { GoHistory, GoStack } from "react-icons/go";
11+
import { IoSwapHorizontal } from "react-icons/io5";
12+
import { LuArrowDownToLine } from "react-icons/lu";
1413
import { Link } from "react-router-dom";
1514
import { DISCORD_URL, TWITTER_URL } from "urls";
1615

@@ -40,20 +39,20 @@ export const Navigation = (): JSX.Element => {
4039
},
4140
{
4241
label: "Transfer",
43-
icon: <TransferIcon />,
42+
icon: <IoSwapHorizontal />,
4443
url:
4544
features.maspEnabled || features.namTransfersEnabled ?
4645
routes.transfer
4746
: undefined,
4847
},
4948
{
5049
label: "Receive",
51-
icon: <ReceiveIcon />,
50+
icon: <LuArrowDownToLine />,
5251
url: routes.receive,
5352
},
5453
{
5554
label: "History",
56-
icon: <MdOutlineKeyboardBackspace />,
55+
icon: <GoHistory />,
5756
url:
5857
features.namTransfersEnabled || features.ibcTransfersEnabled ?
5958
routes.history

apps/namadillo/src/App/Masp/MaspShield.tsx

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Panel } from "@namada/components";
22
import { AccountType } from "@namada/types";
3+
import { params, routes } from "App/routes";
34
import { TransferModule } from "App/Transfer/TransferModule";
45
import { OnSubmitTransferParams } from "App/Transfer/types";
56
import { allDefaultAccountsAtom } from "atoms/accounts";
@@ -14,8 +15,8 @@ import invariant from "invariant";
1415
import { useAtom, useAtomValue } from "jotai";
1516
import { createTransferDataFromNamada } from "lib/transactions";
1617
import { useEffect, useState } from "react";
18+
import { Link } from "react-router-dom";
1719
import { AssetWithAmountAndChain } from "types";
18-
1920
interface MaspShieldProps {
2021
sourceAddress: string;
2122
setSourceAddress: (address?: string) => void;
@@ -52,6 +53,9 @@ export const MaspShield = ({
5253
const transparentAddress = defaultAccounts.data?.find(
5354
(account) => account.type !== AccountType.ShieldedKeys
5455
)?.address;
56+
const shieldedAddress = defaultAccounts.data?.find(
57+
(account) => account.type === AccountType.ShieldedKeys
58+
)?.address;
5559
const ledgerAccountInfo = ledgerStatus && {
5660
deviceConnected: ledgerStatus.connected,
5761
errorMessage: ledgerStatus.errorMessage,
@@ -147,9 +151,7 @@ export const MaspShield = ({
147151

148152
return (
149153
<Panel className="rounded-sm flex flex-col flex-1 py-9">
150-
<header className="flex flex-col text-yellow items-center text-center mb-8 gap-6">
151-
Shield Assets
152-
</header>
154+
<header className="text-yellow text-center mb-8 gap-6">Shield</header>
153155
<TransferModule
154156
source={{
155157
address: sourceAddress,
@@ -177,6 +179,16 @@ export const MaspShield = ({
177179
assetSelectorModalOpen={assetSelectorModalOpen}
178180
setAssetSelectorModalOpen={setAssetSelectorModalOpen}
179181
/>
182+
<div className="flex flex-row font-normal justify-center mt-10 gap-2">
183+
<h4>Looking to Unshield tokens?</h4>
184+
<Link
185+
className="text-yellow underline"
186+
to={`${routes.transfer}?${params.source}=${shieldedAddress || ""}&${params.destination}=${transparentAddress}`}
187+
title={`View pending transactions`}
188+
>
189+
Click here.
190+
</Link>
191+
</div>
180192
</Panel>
181193
);
182194
};

apps/namadillo/src/App/Masp/MaspUnshield.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,7 @@ export const MaspUnshield = ({
132132

133133
return (
134134
<Panel className="relative rounded-sm flex flex-col flex-1 pt-9">
135-
<header className="flex flex-col text-yellow items-center text-center mb-8 gap-6">
136-
Unshield Assets
137-
</header>
135+
<header className="text-center mb-8 gap-6">Unshield</header>
138136
<TransferModule
139137
source={{
140138
address: sourceAddress,

apps/namadillo/src/App/Masp/ShieldedFungibleTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export const ShieldedFungibleTable = ({
146146
</ActionButton>
147147
<div key={`swap-${address}`} className="relative group/tooltip mr-5">
148148
<Link
149-
to={`${routes.transfer}?${params.asset}=${address}&${params.shielded}=0`}
149+
to={`${routes.transfer}?${params.asset}=${asset.symbol}&${params.source}=${shieldedAddress}`}
150150
className={twMerge(
151151
"bg-black rounded-full w-10 h-10 flex items-center justify-center p-0",
152152
"hover:bg-white hover:text-black transition-all duration-300"

0 commit comments

Comments
 (0)