diff --git a/packages/desktop/components/popup/popups/ActivityDetailsPopup.svelte b/packages/desktop/components/popup/popups/ActivityDetailsPopup.svelte index 2af0ddedf2..791d7a9163 100644 --- a/packages/desktop/components/popup/popups/ActivityDetailsPopup.svelte +++ b/packages/desktop/components/popup/popups/ActivityDetailsPopup.svelte @@ -10,7 +10,6 @@ selectedAccountActivities, } from '@core/activity' import { getTransactionAssets } from '@core/activity/utils' - import { openUrlInBrowser } from '@core/app' import { localize } from '@core/i18n' import { ExplorerEndpoint } from '@core/network' import { getDefaultExplorerUrl } from '@core/network/utils' @@ -143,11 +142,7 @@ >
{#if explorerUrl && activity.transactionId} - openUrlInBrowser(explorerUrl)} - /> + {:else if activity.transactionId} - import { Alert } from '@bloomwalletio/ui' + import { Alert, Text } from '@bloomwalletio/ui' import { handleError } from '@core/error/handlers' import { localize } from '@core/i18n' import { closePopup } from '@desktop/auxiliary/popup' @@ -9,6 +9,7 @@ export let variant: 'primary' | 'success' | 'warning' | 'danger' | 'info' = 'primary' export let title: string export let description: string = '' + export let text: string = '' export let alert: { variant?: 'success' | 'warning' | 'danger' | 'info'; text: string } | undefined = undefined export let backText: string = localize('actions.cancel') export let confirmText: string = localize('actions.confirm') @@ -67,4 +68,7 @@ {#if alert} {/if} + {#if text} + {text} + {/if} diff --git a/packages/desktop/components/popup/popups/LegalUpdatePopup.svelte b/packages/desktop/components/popup/popups/LegalUpdatePopup.svelte index a924620c57..f394f705a0 100644 --- a/packages/desktop/components/popup/popups/LegalUpdatePopup.svelte +++ b/packages/desktop/components/popup/popups/LegalUpdatePopup.svelte @@ -6,7 +6,6 @@ TERMS_OF_SERVICE_VERSION, needsToAcceptLatestPrivacyPolicy, needsToAcceptLatestTermsOfService, - openUrlInBrowser, } from '@core/app' import { lastAcceptedPrivacyPolicy, lastAcceptedTermsOfService } from '@core/app/stores' import { localize } from '@core/i18n' @@ -18,14 +17,6 @@ const tos = needsToAcceptLatestTermsOfService() const privacyPolicy = needsToAcceptLatestPrivacyPolicy() - function onTermsOfServiceClick(): void { - openUrlInBrowser(TERMS_OF_SERVICE_URL) - } - - function onPrivacyPolicyClick(): void { - openUrlInBrowser(PRIVACY_POLICY_URL) - } - function onConfirmClick(): void { if (tos) { lastAcceptedTermsOfService.set(TERMS_OF_SERVICE_VERSION) @@ -71,19 +62,9 @@
{localize('views.onboarding.welcome.legalAction')}
- +  &  - +
diff --git a/packages/desktop/lib/electron/managers/transak.manager.ts b/packages/desktop/lib/electron/managers/transak.manager.ts index 00af4cab2b..00b43cc9f1 100644 --- a/packages/desktop/lib/electron/managers/transak.manager.ts +++ b/packages/desktop/lib/electron/managers/transak.manager.ts @@ -141,14 +141,14 @@ export default class TransakManager implements ITransakManager { windows.transak.webContents.addListener('did-navigate-in-page', (_, url) => { const urlToBeMatched = TRANSAK_WIDGET_URL + '/googlepay' if (url.startsWith(urlToBeMatched)) { - void shell.openExternal(url) + windows.main.webContents.send('try-open-url-in-browser', url) void windows.transak.loadURL(initialUrl) } }) windows.transak.webContents.addListener('will-navigate', (event) => { event.preventDefault() - void shell.openExternal(event.url) + windows.main.webContents.send('try-open-url-in-browser', event.url) }) return windows.transak diff --git a/packages/desktop/lib/electron/processes/main.process.ts b/packages/desktop/lib/electron/processes/main.process.ts index 037fb1cfde..f04b734e29 100644 --- a/packages/desktop/lib/electron/processes/main.process.ts +++ b/packages/desktop/lib/electron/processes/main.process.ts @@ -233,11 +233,11 @@ export function createMainWindow(): BrowserWindow { /** * `will-navigate` is emitted whenever window.location is updated. - * This happens e.g. when clicking on a link ( { - tryOpenExternalUrl(a as unknown as Event, b) + windows.main.webContents.on('will-navigate', (e) => { + e.preventDefault() }) windows.main.on('close', () => { diff --git a/packages/desktop/lib/helpers.ts b/packages/desktop/lib/helpers.ts index 86ca5246a5..3c66740da9 100644 --- a/packages/desktop/lib/helpers.ts +++ b/packages/desktop/lib/helpers.ts @@ -69,10 +69,10 @@ export function registerMenuButtons(): void { }) Platform.onEvent('menu-error-log', () => { closeDrawer() - openPopup({ id: PopupId.ErrorLog }) + openPopup({ id: PopupId.ErrorLog }, false, false) }) Platform.onEvent('menu-diagnostics', () => { closeDrawer() - openPopup({ id: PopupId.Diagnostics }) + openPopup({ id: PopupId.Diagnostics }, false, false) }) } diff --git a/packages/desktop/views/dashboard/campaigns/components/CampaignHeader.svelte b/packages/desktop/views/dashboard/campaigns/components/CampaignHeader.svelte index 70c6567a2d..30c5cee0f0 100644 --- a/packages/desktop/views/dashboard/campaigns/components/CampaignHeader.svelte +++ b/packages/desktop/views/dashboard/campaigns/components/CampaignHeader.svelte @@ -116,11 +116,7 @@
- openUrlInBrowser(campaign.url)} - /> + diff --git a/packages/desktop/views/dashboard/drawers/dapp-config/components/DappInformationCard.svelte b/packages/desktop/views/dashboard/drawers/dapp-config/components/DappInformationCard.svelte index cc074365ff..f547809583 100644 --- a/packages/desktop/views/dashboard/drawers/dapp-config/components/DappInformationCard.svelte +++ b/packages/desktop/views/dashboard/drawers/dapp-config/components/DappInformationCard.svelte @@ -1,5 +1,4 @@ {#if $loginRoute === LoginRoute.SelectProfile} diff --git a/packages/desktop/views/login/views/LoginView.svelte b/packages/desktop/views/login/views/LoginView.svelte index bb8dcacd61..c18cc32412 100644 --- a/packages/desktop/views/login/views/LoginView.svelte +++ b/packages/desktop/views/login/views/LoginView.svelte @@ -1,17 +1,12 @@
@@ -18,9 +13,9 @@  
diff --git a/packages/shared/src/components/molecules/DappInfo.svelte b/packages/shared/src/components/molecules/DappInfo.svelte index 909509001b..87b86ec823 100644 --- a/packages/shared/src/components/molecules/DappInfo.svelte +++ b/packages/shared/src/components/molecules/DappInfo.svelte @@ -4,7 +4,6 @@ import { Avatar, Icon, IconName, Link, Text } from '@bloomwalletio/ui' import { DappVerificationPill } from '@ui' import { VERIFICATION_ICONS } from '@auxiliary/wallet-connect/constants/verification-icons.constant' - import { openUrlInBrowser } from '@core/app/utils' export let metadata: CoreTypes.Metadata export let verifiedState: DappVerification | undefined = undefined @@ -30,7 +29,7 @@ {/if} {#if showLink} - openUrlInBrowser(metadata.url)} /> + {:else} {metadata.url} diff --git a/packages/shared/src/lib/core/app/utils/openUrlInBrowser.ts b/packages/shared/src/lib/core/app/utils/openUrlInBrowser.ts index c42687450b..05a28ee9ad 100644 --- a/packages/shared/src/lib/core/app/utils/openUrlInBrowser.ts +++ b/packages/shared/src/lib/core/app/utils/openUrlInBrowser.ts @@ -30,7 +30,7 @@ export function openUrlInBrowser(targetUrl: string | undefined): void { id: PopupId.Confirmation, props: { title: localize('popups.externalUrl.title'), - description: localize('popups.externalUrl.body', { values: { url: targetUrl } }), + text: localize('popups.externalUrl.body', { values: { url: targetUrl } }), confirmText: localize('popups.externalUrl.action'), onConfirm: () => { openHttpsUrlsOnly(url.protocol, targetUrl)