From 2a46479bd9d69f5bc68845fc59ad8357dc6a9cf0 Mon Sep 17 00:00:00 2001 From: Nicole O'Brien Date: Wed, 14 Aug 2024 14:40:28 +0100 Subject: [PATCH 1/6] chore: increment desktop version to `1.2.0-alpha-1` --- packages/desktop/package.json | 2 +- packages/shared/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/desktop/package.json b/packages/desktop/package.json index 111a04d791..c3d8ce5013 100644 --- a/packages/desktop/package.json +++ b/packages/desktop/package.json @@ -1,7 +1,7 @@ { "name": "desktop", "productName": "Bloom", - "version": "1.1.3", + "version": "1.2.0-alpha-1", "description": "Simple and secure web3 wallet for the IOTA and Shimmer ecosystem", "main": "public/build/main.process.js", "repository": "git@github.com:bloomwalletio/bloom.git", diff --git a/packages/shared/package.json b/packages/shared/package.json index 0bd25c933d..62da9816be 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "shared", - "version": "1.1.3", + "version": "1.2.0", "description": "TypeScript library for the Bloom application", "author": "Bloom Labs Ltd ", "license": "PolyForm Strict License 1.0.0", From c62a7ee2004a9a899fe86a87735a45834c1b8303 Mon Sep 17 00:00:00 2001 From: Jean Ribeiro Date: Wed, 14 Aug 2024 12:45:01 -0300 Subject: [PATCH 2/6] fix: transak image reference --- .../dashboard/buy-sell/components/TransakQuotationTile.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/desktop/views/dashboard/buy-sell/components/TransakQuotationTile.svelte b/packages/desktop/views/dashboard/buy-sell/components/TransakQuotationTile.svelte index 57ada5c1c7..52ad4c7dde 100644 --- a/packages/desktop/views/dashboard/buy-sell/components/TransakQuotationTile.svelte +++ b/packages/desktop/views/dashboard/buy-sell/components/TransakQuotationTile.svelte @@ -26,7 +26,7 @@ data-label="transak-logo" width="90" height="28" - src="assets/logos/transak.svg" + src="assets/logos/transak-full.svg" alt="Transak" class:opacity-0={isLoading} /> From a70fefda7df605bd47a2c10d0dfe3d58341169b7 Mon Sep 17 00:00:00 2001 From: Jean Ribeiro Date: Wed, 14 Aug 2024 13:08:56 -0300 Subject: [PATCH 3/6] fix: prevent clickOutside event to be triggered if clicking on navbar --- packages/shared/src/lib/core/utils/ui.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/shared/src/lib/core/utils/ui.ts b/packages/shared/src/lib/core/utils/ui.ts index 4ba44c32ea..ca65425a34 100644 --- a/packages/shared/src/lib/core/utils/ui.ts +++ b/packages/shared/src/lib/core/utils/ui.ts @@ -28,7 +28,13 @@ export function debounce(callback: T, wait = 500): Ui */ export const clickOutside: Action = function (node) { const onClick: (event: Event) => void = (event) => { - if (node && !node.contains(event.target as Node) && !event.defaultPrevented) { + if (!node) { + return + } + + const hasClickedInNavbar = document.querySelector('body > app > navbar')?.contains(event.target as Node) + const hasClickedOutside = !node.contains(event.target as Node) + if (hasClickedOutside && !hasClickedInNavbar && !event.defaultPrevented) { node.dispatchEvent(new CustomEvent('clickOutside', { detail: event })) } } From 0df12866284d7cc87a2d10e7a9e64ea39f39b6d3 Mon Sep 17 00:00:00 2001 From: Jean Ribeiro Date: Wed, 14 Aug 2024 18:00:34 -0300 Subject: [PATCH 4/6] chore: removes unused code --- .../components/popup/popups/TransakFramePopup.svelte | 9 --------- 1 file changed, 9 deletions(-) diff --git a/packages/desktop/components/popup/popups/TransakFramePopup.svelte b/packages/desktop/components/popup/popups/TransakFramePopup.svelte index 37c553c0a9..792c34312b 100644 --- a/packages/desktop/components/popup/popups/TransakFramePopup.svelte +++ b/packages/desktop/components/popup/popups/TransakFramePopup.svelte @@ -2,7 +2,6 @@ import { TransakCryptoCurrency } from '@auxiliary/transak' import { Button, Icon, IconName, Spinner, Text } from '@bloomwalletio/ui' import { DISCORD_URL } from '@contexts/settings' - import { selectedAccountIndex } from '@core/account/stores' import { openUrlInBrowser, Platform } from '@core/app' import { localize } from '@core/i18n' import { FiatCurrency } from '@core/market' @@ -25,9 +24,6 @@ let isTransakOpen: boolean = false let isTransakLoading: boolean = false - $: if ($selectedAccountIndex !== undefined) { - void closeTransak() - } $: isTransakOpen, void handleOverlayChanges($popupState) Platform.onEvent('transak-loaded', () => (isTransakLoading = false)) @@ -87,11 +83,6 @@ await updateTransakBounds() } - async function closeTransak(): Promise { - await Platform.closeTransak() - isTransakOpen = false - } - function onButtonClick(): void { openUrlInBrowser(DISCORD_URL) } From 26d25cb92714c22ebc330cd9af8373177aed01e8 Mon Sep 17 00:00:00 2001 From: Nicole O'Brien Date: Thu, 15 Aug 2024 15:02:15 +0100 Subject: [PATCH 5/6] fix: bug in electron on mac os meaning transak not rendered when background of window is transparent Co-authored-by: Jean Ribeiro --- .../popup/popups/TransakFramePopup.svelte | 7 +++++-- .../lib/electron/preloads/transak.preload.ts | 15 +++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/packages/desktop/components/popup/popups/TransakFramePopup.svelte b/packages/desktop/components/popup/popups/TransakFramePopup.svelte index 792c34312b..6b81d92b2b 100644 --- a/packages/desktop/components/popup/popups/TransakFramePopup.svelte +++ b/packages/desktop/components/popup/popups/TransakFramePopup.svelte @@ -2,7 +2,7 @@ import { TransakCryptoCurrency } from '@auxiliary/transak' import { Button, Icon, IconName, Spinner, Text } from '@bloomwalletio/ui' import { DISCORD_URL } from '@contexts/settings' - import { openUrlInBrowser, Platform } from '@core/app' + import { IS_MAC, openUrlInBrowser, Platform } from '@core/app' import { localize } from '@core/i18n' import { FiatCurrency } from '@core/market' import { SupportedNetworkId } from '@core/network' @@ -118,11 +118,14 @@ {/if} + {#if IS_MAC} +
+ {/if} diff --git a/packages/desktop/lib/electron/preloads/transak.preload.ts b/packages/desktop/lib/electron/preloads/transak.preload.ts index 2ff174de2a..5f699ace69 100644 --- a/packages/desktop/lib/electron/preloads/transak.preload.ts +++ b/packages/desktop/lib/electron/preloads/transak.preload.ts @@ -30,11 +30,14 @@ function observeStyleChanges(targetNode: Element): void { window.addEventListener('DOMContentLoaded', () => { observeStyleChanges(window.document.documentElement) - const appRoot = window.document.getElementById('appRoot') - if (appRoot) { - appRoot.style.borderBottomLeftRadius = '32px' - appRoot.style.borderBottomRightRadius = '32px' - appRoot.style.overflow = 'hidden' + // TODO: Potential bug in electron means that the page is not rendered properly on Mac when the background is transparent + if (process.platform !== 'darwin') { + const appRoot = window.document.getElementById('appRoot') + if (appRoot) { + appRoot.style.borderBottomLeftRadius = '32px' + appRoot.style.borderBottomRightRadius = '32px' + appRoot.style.overflow = 'hidden' + } + window.document.documentElement.style.backgroundColor = 'transparent' } - window.document.documentElement.style.backgroundColor = 'transparent' }) From 19eb4ae1f140bebf78751ac8a61137ec7b21cb93 Mon Sep 17 00:00:00 2001 From: Nicole O'Brien Date: Thu, 15 Aug 2024 17:03:00 +0100 Subject: [PATCH 6/6] chore: increment desktop version to `1.2.0` --- packages/desktop/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/desktop/package.json b/packages/desktop/package.json index c3d8ce5013..13da3b3915 100644 --- a/packages/desktop/package.json +++ b/packages/desktop/package.json @@ -1,7 +1,7 @@ { "name": "desktop", "productName": "Bloom", - "version": "1.2.0-alpha-1", + "version": "1.2.0", "description": "Simple and secure web3 wallet for the IOTA and Shimmer ecosystem", "main": "public/build/main.process.js", "repository": "git@github.com:bloomwalletio/bloom.git",