From d8a39f048d982628355e2bcda7c6d88714385a69 Mon Sep 17 00:00:00 2001 From: evavirseda Date: Tue, 18 Jul 2023 11:34:00 +0200 Subject: [PATCH 1/5] refactor: cleanup box --- .../shared/components/atoms/SubjectBox.svelte | 4 +-- .../shared/components/boxes/AddressBox.svelte | 2 +- packages/shared/components/boxes/Box.svelte | 29 +++++++------------ .../components/boxes/CopyableBox.svelte | 4 +-- 4 files changed, 15 insertions(+), 24 deletions(-) diff --git a/packages/shared/components/atoms/SubjectBox.svelte b/packages/shared/components/atoms/SubjectBox.svelte index 5ad8efd1f95..ed3aed0633c 100644 --- a/packages/shared/components/atoms/SubjectBox.svelte +++ b/packages/shared/components/atoms/SubjectBox.svelte @@ -7,13 +7,13 @@ {#if subject.type === 'account'} - + {:else if subject.type === 'address'} {:else} - + {localize('general.unknownAddress')} diff --git a/packages/shared/components/boxes/AddressBox.svelte b/packages/shared/components/boxes/AddressBox.svelte index e5cc93e3bf2..debe3ea585c 100644 --- a/packages/shared/components/boxes/AddressBox.svelte +++ b/packages/shared/components/boxes/AddressBox.svelte @@ -13,7 +13,7 @@ {#if address} - + {#if address.length > 20} {address.slice(0, address.length / 2)} diff --git a/packages/shared/components/boxes/Box.svelte b/packages/shared/components/boxes/Box.svelte index 8e1d144e5ec..2b106cbdac9 100644 --- a/packages/shared/components/boxes/Box.svelte +++ b/packages/shared/components/boxes/Box.svelte @@ -1,23 +1,16 @@ - - + diff --git a/packages/shared/components/boxes/CopyableBox.svelte b/packages/shared/components/boxes/CopyableBox.svelte index 9c339b5428c..81109c4f186 100644 --- a/packages/shared/components/boxes/CopyableBox.svelte +++ b/packages/shared/components/boxes/CopyableBox.svelte @@ -8,9 +8,7 @@ export let value = '' export let isCopyable = true export let clearPadding = false - export let clearBoxPadding = false export let offset: number = undefined - export let classes = '' let tooltipAnchor: HTMLElement let showTooltip = false @@ -38,7 +36,7 @@ on:click={onClick} class="{clearPadding ? '' : 'w-full'} {isCopyable ? 'cursor-pointer' : 'cursor-default'}" > - + From f45c2f3bfa6756ca3211e8e67873365ea2053c26 Mon Sep 17 00:00:00 2001 From: evavirseda Date: Wed, 23 Aug 2023 16:53:21 +0200 Subject: [PATCH 2/5] fix: bring back classes and fix props --- .../popups/MintNftConfirmationPopup.svelte | 2 +- packages/shared/components/boxes/Box.svelte | 3 ++- .../shared/components/boxes/CopyableBox.svelte | 14 +++++++------- .../shared/components/boxes/KeyValueBox.svelte | 14 +++++--------- 4 files changed, 15 insertions(+), 18 deletions(-) diff --git a/packages/desktop/components/popups/MintNftConfirmationPopup.svelte b/packages/desktop/components/popups/MintNftConfirmationPopup.svelte index bab7511570c..74d5ce8647e 100644 --- a/packages/desktop/components/popups/MintNftConfirmationPopup.svelte +++ b/packages/desktop/components/popups/MintNftConfirmationPopup.svelte @@ -129,7 +129,7 @@ {/if} diff --git a/packages/shared/components/boxes/Box.svelte b/packages/shared/components/boxes/Box.svelte index 2b106cbdac9..4dd30cc964d 100644 --- a/packages/shared/components/boxes/Box.svelte +++ b/packages/shared/components/boxes/Box.svelte @@ -4,10 +4,11 @@ export let backgroundColor: string = '' export let centered: boolean = false export let padding: string = '' + export let classes = '' - + @@ -44,7 +44,7 @@ {#if isCopyable && showTooltip} From 47b6845782a6bfff9fa76ce0dfb216196710ce8a Mon Sep 17 00:00:00 2001 From: evavirseda Date: Thu, 24 Aug 2023 13:48:29 +0200 Subject: [PATCH 3/5] feat: bring back props --- packages/shared/components/SubjectBox.svelte | 4 ++-- .../shared/components/boxes/AddressBox.svelte | 16 +++++++------- packages/shared/components/boxes/Box.svelte | 22 ++++++++++++------- .../components/boxes/CopyableBox.svelte | 8 ++++--- .../components/boxes/KeyValueBox.svelte | 12 ++++++---- 5 files changed, 37 insertions(+), 25 deletions(-) diff --git a/packages/shared/components/SubjectBox.svelte b/packages/shared/components/SubjectBox.svelte index 7ea60b96819..b615b8c07bd 100644 --- a/packages/shared/components/SubjectBox.svelte +++ b/packages/shared/components/SubjectBox.svelte @@ -7,13 +7,13 @@ {#if subject?.type === 'account'} - + {:else if subject?.type === 'address'} {:else} - + {localize('general.unknownAddress')} diff --git a/packages/shared/components/boxes/AddressBox.svelte b/packages/shared/components/boxes/AddressBox.svelte index debe3ea585c..25726827742 100644 --- a/packages/shared/components/boxes/AddressBox.svelte +++ b/packages/shared/components/boxes/AddressBox.svelte @@ -1,9 +1,9 @@ {#if address} - + {#if address.length > 20} - + {address.slice(0, address.length / 2)} - + {address.slice(address.length / 2)} {:else} - + {address} {/if} diff --git a/packages/shared/components/boxes/Box.svelte b/packages/shared/components/boxes/Box.svelte index 4dd30cc964d..9f05d1b1a67 100644 --- a/packages/shared/components/boxes/Box.svelte +++ b/packages/shared/components/boxes/Box.svelte @@ -1,17 +1,23 @@ diff --git a/packages/shared/components/boxes/CopyableBox.svelte b/packages/shared/components/boxes/CopyableBox.svelte index fb837b55aa4..aca769c5212 100644 --- a/packages/shared/components/boxes/CopyableBox.svelte +++ b/packages/shared/components/boxes/CopyableBox.svelte @@ -7,6 +7,8 @@ export let value: string = '' export let isCopyable: boolean = true + export let clearPadding: boolean = false + export let clearBoxPadding: boolean = false export let offset: number | undefined = undefined export let classes: string = '' @@ -34,9 +36,9 @@ type="button" bind:this={tooltipAnchor} on:click={onClick} - class="w-full {isCopyable ? 'cursor-pointer' : 'cursor-default'}" + class="{clearPadding ? '' : 'w-full'} {isCopyable ? 'cursor-pointer' : 'cursor-default'}" > - + @@ -44,7 +46,7 @@ {#if isCopyable && showTooltip} From 3fb08cb53af43b9da5fd3424dacd5a673481761b Mon Sep 17 00:00:00 2001 From: evavirseda Date: Fri, 25 Aug 2023 18:39:15 +0200 Subject: [PATCH 4/5] fix: cleanup and remove backsticks --- packages/shared/components/boxes/Box.svelte | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/shared/components/boxes/Box.svelte b/packages/shared/components/boxes/Box.svelte index 9f05d1b1a67..e58f004f5a0 100644 --- a/packages/shared/components/boxes/Box.svelte +++ b/packages/shared/components/boxes/Box.svelte @@ -9,15 +9,12 @@ From 1a3174389ca1ba14bbcef55931ef723d0c1c3cbb Mon Sep 17 00:00:00 2001 From: evavirseda Date: Mon, 28 Aug 2023 16:44:33 +0200 Subject: [PATCH 5/5] fix amount filter css --- packages/desktop/components/filter/FilterItem.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/desktop/components/filter/FilterItem.svelte b/packages/desktop/components/filter/FilterItem.svelte index 9d8acd5d2f1..57a0bd42304 100644 --- a/packages/desktop/components/filter/FilterItem.svelte +++ b/packages/desktop/components/filter/FilterItem.svelte @@ -66,7 +66,7 @@