From 11ac4e8248a6b072e447b79bb9b8cbf1c62805d1 Mon Sep 17 00:00:00 2001 From: Nicole O'Brien Date: Fri, 25 Aug 2023 14:13:09 +0100 Subject: [PATCH 1/5] initial work for network avatar --- packages/shared/package.json | 2 +- .../src/components/atoms/NetworkIcon.svelte | 36 ++++--------------- packages/shared/tailwind.config.js | 1 - yarn.lock | 8 ++--- 4 files changed, 12 insertions(+), 35 deletions(-) diff --git a/packages/shared/package.json b/packages/shared/package.json index 40fbc6eadd..a4a2ec1e5f 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -5,7 +5,7 @@ "author": "Charlie Varley ", "license": "Apache-2.0", "dependencies": { - "@bloomwalletio/ui": "0.7.0", + "@bloomwalletio/ui": "0.7.3", "@iota/bundle": "1.0.0-beta.30", "@iota/converter": "1.0.0-beta.30", "@iota/crypto.js": "1.8.6", diff --git a/packages/shared/src/components/atoms/NetworkIcon.svelte b/packages/shared/src/components/atoms/NetworkIcon.svelte index 7089d9c0e8..71dff66deb 100644 --- a/packages/shared/src/components/atoms/NetworkIcon.svelte +++ b/packages/shared/src/components/atoms/NetworkIcon.svelte @@ -1,37 +1,15 @@ - - - - - + + diff --git a/packages/shared/tailwind.config.js b/packages/shared/tailwind.config.js index 8a85d0145c..09cf252462 100644 --- a/packages/shared/tailwind.config.js +++ b/packages/shared/tailwind.config.js @@ -58,7 +58,6 @@ module.exports = { extend: { colors: { current: 'currentColor', - gray: colors.slate, transparent: 'transparent', black: '#000', white: '#fff', diff --git a/yarn.lock b/yarn.lock index 706bc92312..0000c4fd94 100644 --- a/yarn.lock +++ b/yarn.lock @@ -342,10 +342,10 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@bloomwalletio/ui@0.7.0": - version "0.7.0" - resolved "https://npm.pkg.github.com/download/@bloomwalletio/ui/0.7.0/644b7f7d5608b7cef279725e75a731a505dd3618#644b7f7d5608b7cef279725e75a731a505dd3618" - integrity sha512-665sGBFhZ6eCkb73wtjJlWh2xubAyn+ALqOrt5c8hLZ6BvHeq9H87IV5/j60d3P6wcl3pwFpO1ouNE3j/JNuQA== +"@bloomwalletio/ui@0.7.3": + version "0.7.3" + resolved "https://npm.pkg.github.com/download/@bloomwalletio/ui/0.7.3/df026d1af49387464dfaf7a19c5053bb46c3ca3e#df026d1af49387464dfaf7a19c5053bb46c3ca3e" + integrity sha512-8mHup7u9MY7qKzJS2MeFyCDGflZdMsgP3oiEodmIaBOSReXmgCzibEfYh8CxRV97pUDyI7DdApLeYLozI6WQAQ== dependencies: "@floating-ui/dom" "1.4.3" "@popperjs/core" "2.11.8" From 1a12015c83896e2e1906703d24d0d1385ca97fff Mon Sep 17 00:00:00 2001 From: Nicole O'Brien Date: Fri, 25 Aug 2023 15:54:29 +0100 Subject: [PATCH 2/5] network avatar refactor Co-authored-by: Tuditi Co-authored-by: Jean Ribeiro Co-authored-by: MarkNerdi996 --- packages/desktop/components/ContactAddressCard.svelte | 4 ++-- .../desktop/components/modals/AccountSwitcherModal.svelte | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/desktop/components/ContactAddressCard.svelte b/packages/desktop/components/ContactAddressCard.svelte index 7e84375457..1f1c4b4aa2 100644 --- a/packages/desktop/components/ContactAddressCard.svelte +++ b/packages/desktop/components/ContactAddressCard.svelte @@ -11,7 +11,7 @@ import { closeDrawer } from '@desktop/auxiliary/drawer' import { PopupId, openPopup } from '@desktop/auxiliary/popup' import features from '@features/features' - import { MeatballMenuButton, MenuItem, Modal, NetworkIcon, Text } from '@ui' + import { MeatballMenuButton, MenuItem, Modal, NetworkAvatar, Text } from '@ui' import { FontWeight, TextType } from '@ui/enums' import { ContactBookRoute } from '@views/dashboard/drawers/contact-book/contact-book-route.enum' import { SendFlowRouter, sendFlowRouter } from '@views/dashboard/send-flow' @@ -55,7 +55,7 @@ >
- + {getNameFromNetworkId(networkId)}
diff --git a/packages/desktop/components/modals/AccountSwitcherModal.svelte b/packages/desktop/components/modals/AccountSwitcherModal.svelte index 46167ea861..74c31ed63a 100644 --- a/packages/desktop/components/modals/AccountSwitcherModal.svelte +++ b/packages/desktop/components/modals/AccountSwitcherModal.svelte @@ -1,5 +1,5 @@ - - - diff --git a/packages/shared/src/components/atoms/index.js b/packages/shared/src/components/atoms/index.js index 90753928da..cf59112f90 100644 --- a/packages/shared/src/components/atoms/index.js +++ b/packages/shared/src/components/atoms/index.js @@ -4,7 +4,6 @@ export { default as Icon } from './Icon.svelte' export { default as LedgerAnimation } from './LedgerAnimation.svelte' export { default as MediaDisplay } from './MediaDisplay.svelte' export { default as MenuItem } from './MenuItem.svelte' -export { default as NetworkIcon } from './NetworkIcon.svelte' export { default as Pane } from './Pane.svelte' export { default as ProposalsDetailsButton } from './ProposalsDetailsButton.svelte' export { default as Tabs } from './Tabs.svelte' diff --git a/packages/shared/src/components/avatars/ContactAvatar.svelte b/packages/shared/src/components/avatars/ContactAvatar.svelte index e52c2e1b2c..f851034bef 100644 --- a/packages/shared/src/components/avatars/ContactAvatar.svelte +++ b/packages/shared/src/components/avatars/ContactAvatar.svelte @@ -8,5 +8,5 @@ - + diff --git a/packages/shared/src/components/avatars/NetworkAvatar.svelte b/packages/shared/src/components/avatars/NetworkAvatar.svelte new file mode 100644 index 0000000000..45ce0d0b9f --- /dev/null +++ b/packages/shared/src/components/avatars/NetworkAvatar.svelte @@ -0,0 +1,30 @@ + + + + diff --git a/packages/shared/src/components/avatars/ProfileAvatar.svelte b/packages/shared/src/components/avatars/ProfileAvatar.svelte index 56b4a7749c..acc5d8fc71 100644 --- a/packages/shared/src/components/avatars/ProfileAvatar.svelte +++ b/packages/shared/src/components/avatars/ProfileAvatar.svelte @@ -12,6 +12,6 @@ {#if profile?.pfp} {:else if profile?.name} - + {/if} diff --git a/packages/shared/src/components/avatars/index.js b/packages/shared/src/components/avatars/index.js index 79e14ffbbf..423547814e 100644 --- a/packages/shared/src/components/avatars/index.js +++ b/packages/shared/src/components/avatars/index.js @@ -1,3 +1,4 @@ export { default as ContactAvatar } from './ContactAvatar.svelte' export { default as NftAvatar } from './NftAvatar.svelte' +export { default as NetworkAvatar } from './NetworkAvatar.svelte' export { default as ProfileAvatar } from './ProfileAvatar.svelte' diff --git a/packages/shared/src/components/badges/NetworkIconBadge.svelte b/packages/shared/src/components/badges/NetworkBadge.svelte similarity index 73% rename from packages/shared/src/components/badges/NetworkIconBadge.svelte rename to packages/shared/src/components/badges/NetworkBadge.svelte index ed4704cef2..c7a9795b36 100644 --- a/packages/shared/src/components/badges/NetworkIconBadge.svelte +++ b/packages/shared/src/components/badges/NetworkBadge.svelte @@ -1,12 +1,11 @@ - + From d65b5c505c64d5b7222007af6e2b63dbe30561e5 Mon Sep 17 00:00:00 2001 From: Jean Ribeiro Date: Thu, 31 Aug 2023 22:35:27 -0300 Subject: [PATCH 5/5] fix: NetworkAvatar size in TransactionDetails --- .../send-flow/views/components/EvmTransactionDetails.svelte | 6 +++--- .../views/components/StardustTransactionDetails.svelte | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/desktop/views/dashboard/send-flow/views/components/EvmTransactionDetails.svelte b/packages/desktop/views/dashboard/send-flow/views/components/EvmTransactionDetails.svelte index 90f178834f..c8b81fda08 100644 --- a/packages/desktop/views/dashboard/send-flow/views/components/EvmTransactionDetails.svelte +++ b/packages/desktop/views/dashboard/send-flow/views/components/EvmTransactionDetails.svelte @@ -18,8 +18,8 @@ {#if destinationNetwork}
{localize('general.destinationNetwork')} -
- +
+ {destinationNetwork}
@@ -45,7 +45,7 @@