From 0e97e3f278930bbf29fb4ce8c6bf9a5b21b2f161 Mon Sep 17 00:00:00 2001 From: Ilja Date: Tue, 22 Feb 2022 14:12:50 +0200 Subject: [PATCH] Improve account selection ux --- .../public/icons/delete-icon.svg | 6 ++++++ wallets/react-wallet-v2/public/main.css | 4 ++++ .../src/components/PairingCard.tsx | 11 +++++++---- .../src/components/SessionCard.tsx | 11 +++++++---- .../src/views/SessionProposalModal.tsx | 17 ++++++++++++++--- 5 files changed, 38 insertions(+), 11 deletions(-) create mode 100644 wallets/react-wallet-v2/public/icons/delete-icon.svg diff --git a/wallets/react-wallet-v2/public/icons/delete-icon.svg b/wallets/react-wallet-v2/public/icons/delete-icon.svg new file mode 100644 index 0000000..ffce69d --- /dev/null +++ b/wallets/react-wallet-v2/public/icons/delete-icon.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/wallets/react-wallet-v2/public/main.css b/wallets/react-wallet-v2/public/main.css index 290a260..df9ea10 100644 --- a/wallets/react-wallet-v2/public/main.css +++ b/wallets/react-wallet-v2/public/main.css @@ -78,4 +78,8 @@ select { select:hover { background-color: rgba(139, 139, 139, 0.35); +} + +i { + margin-top: -5px !important; } \ No newline at end of file diff --git a/wallets/react-wallet-v2/src/components/PairingCard.tsx b/wallets/react-wallet-v2/src/components/PairingCard.tsx index 67e811c..c273ab5 100644 --- a/wallets/react-wallet-v2/src/components/PairingCard.tsx +++ b/wallets/react-wallet-v2/src/components/PairingCard.tsx @@ -1,5 +1,6 @@ import { truncate } from '@/utils/HelperUtil' -import { Avatar, Button, Card, Link, Text } from '@nextui-org/react' +import { Avatar, Button, Card, Link, Text, Tooltip } from '@nextui-org/react' +import Image from 'next/image' /** * Types @@ -42,9 +43,11 @@ export default function PairingCard({ logo, name, url, onDelete }: IProps) { {truncate(url?.split('https://')[1] ?? 'Unknown', 23)} - + + + ) diff --git a/wallets/react-wallet-v2/src/components/SessionCard.tsx b/wallets/react-wallet-v2/src/components/SessionCard.tsx index 8119fef..5976aab 100644 --- a/wallets/react-wallet-v2/src/components/SessionCard.tsx +++ b/wallets/react-wallet-v2/src/components/SessionCard.tsx @@ -1,5 +1,6 @@ import { truncate } from '@/utils/HelperUtil' -import { Avatar, Button, Card, Link, Text } from '@nextui-org/react' +import { Avatar, Button, Card, Link, Text, Tooltip } from '@nextui-org/react' +import Image from 'next/image' /** * Types @@ -42,9 +43,11 @@ export default function SessionCard({ logo, name, url, onDelete }: IProps) { {truncate(url?.split('https://')[1] ?? 'Unknown', 23)} - + + + ) diff --git a/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx b/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx index cd286e3..f0ca6b4 100644 --- a/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx +++ b/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx @@ -1,12 +1,12 @@ import { EIP155_CHAINS, TEIP155Chain } from '@/data/EIP155Data' import ModalStore from '@/store/ModalStore' -import { truncate } from '@/utils/HelperUtil' import { walletConnectClient } from '@/utils/WalletConnectUtil' import { addresses } from '@/utils/WalletUtil' import { Avatar, Button, Card, + Checkbox, Col, Container, Divider, @@ -134,10 +134,20 @@ export default function SessionProposalModal() { key={address} css={{ marginTop: '$5', - backgroundColor: selectedAddresses.includes(address) ? '$green600' : '$accents2' + backgroundColor: selectedAddresses.includes(address) + ? 'rgba(23, 200, 100, 0.2)' + : '$accents2' }} > - {`Acc ${index + 1} - ${truncate(address, 19)}`} + + + + {`Account ${index + 1}`} + ))} @@ -149,6 +159,7 @@ export default function SessionProposalModal() { +