Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rebrand MarkdownBlock #1973

Merged
merged 7 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/desktop/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { handleDeepLink } from '@auxiliary/deep-link/handlers/handleDeepLink'
import { Popup, ProfileAuthPopup } from '@components/popup'
import TitleBar from '@components/TitleBar.svelte'
import { IS_WINDOWS, Platform } from '@core/app'
import { IS_WINDOWS, Platform, openUrlInBrowser } from '@core/app'
import { registerAppEvents, getAndUpdateDarkMode } from '@core/app/actions'
import { appSettings, appVersionDetails, initAppSettings, setAppVersionDetails } from '@core/app/stores'
import { isLocaleLoaded, localeDirection, setupI18n } from '@core/i18n'
Expand Down Expand Up @@ -60,6 +60,7 @@
await checkAndMigrateProfiles()
await cleanupEmptyProfiles()
Platform.onEvent('deep-link-request', handleDeepLink)
Platform.onEvent('try-open-url-in-browser', openUrlInBrowser)

setTimeout(() => {
splash = false
Expand Down
9 changes: 9 additions & 0 deletions packages/desktop/lib/electron/processes/main.process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,15 @@ export function createMainWindow(): BrowserWindow {
cb('')
})

windows.main.webContents.setWindowOpenHandler((details) => {
try {
windows.main.webContents.send('try-open-url-in-browser', details.url)
} catch (err) {
console.error(err)
}
return { action: 'deny' }
})

/**
* Handle permissions requests
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
VotingEventPayload,
TrackedParticipationOverview,
} from '@iota/sdk/out/types'
import { Alert, Button, Table } from '@bloomwalletio/ui'
import { Alert, Button, MarkdownBlock, Table } from '@bloomwalletio/ui'
import { ProposalDetailsMenu } from '@components'
import { getVotingEvent } from '@contexts/governance/actions'
import {
Expand Down Expand Up @@ -36,7 +36,7 @@
import { getBestTimeDuration, milestoneToDate } from '@core/utils'
import { PopupId, openPopup } from '@desktop/auxiliary/popup'
import { ProposalInformationPane, ProposalQuestion, ProposalStatusPill } from '@views/governance'
import { MarkdownBlock, Pane, Text, TextType } from '@ui'
import { Pane, Text, TextType } from '@ui'
import { onDestroy, onMount } from 'svelte'

const { metadata } = $visibleSelectedAccountTokens?.[$activeProfile?.network?.id]?.baseCoin ?? {}
Expand Down
3 changes: 1 addition & 2 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Bloom Labs Ltd <[email protected]>",
"license": "Apache-2.0",
"dependencies": {
"@bloomwalletio/ui": "0.20.4",
"@bloomwalletio/ui": "0.20.5",
"@ethereumjs/rlp": "4.0.1",
"@ethereumjs/tx": "5.2.1",
"@ethereumjs/util": "9.0.2",
Expand All @@ -25,7 +25,6 @@
"sha3": "2.1.4",
"svelte": "3.58.0",
"svelte-i18n": "3.7.4",
"svelte-markdown": "0.4.1",
"web3": "1.10.0",
"zxcvbn": "4.4.2"
},
Expand Down
42 changes: 0 additions & 42 deletions packages/shared/src/components/molecules/MarkdownBlock.svelte

This file was deleted.

1 change: 0 additions & 1 deletion packages/shared/src/components/molecules/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export { default as ActivityInformation } from './ActivityInformation.svelte'
export { default as LedgerStatusIllustration } from './LedgerStatusIllustration.svelte'
export { default as MarkdownBlock } from './MarkdownBlock.svelte'
export { default as MediaIcon } from './MediaIcon.svelte'
export { default as MediaPlaceholder } from './MediaPlaceholder.svelte'
export { default as NetworkRecipientItem } from './NetworkRecipientItem.svelte'
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ export interface IPlatformEventMap {
'version-details': IAppVersionDetails
'version-error': Error
'version-progress': IAppUpdateDownloadProgress
'try-open-url-in-browser': string
}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,10 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@bloomwalletio/[email protected].4":
version "0.20.4"
resolved "https://npm.pkg.github.com/download/@bloomwalletio/ui/0.20.4/55e00320965048d0daef162c9288ac5c75a9da6d#55e00320965048d0daef162c9288ac5c75a9da6d"
integrity sha512-LIwFYpkUrvVJbJMNYucjOFej7+IOYiKswkUNdS1qMFOzAch2zGCr/hDvh31eukhdzEVCCfP5bGLLI2Ck9awKfA==
"@bloomwalletio/[email protected].5":
version "0.20.5"
resolved "https://npm.pkg.github.com/download/@bloomwalletio/ui/0.20.5/544c4e0e2f62d43c695a87d8587ba105b926890e#544c4e0e2f62d43c695a87d8587ba105b926890e"
integrity sha512-10gzI8e1xeEg7ObU2HwH6IBjB8M9RfKi6A9p13JNwSD+bcpGIPrVnOUaGu9oCtBUyNSAMUwXbDE0LTV78gyNEQ==
dependencies:
"@floating-ui/dom" "1.4.3"
"@popperjs/core" "2.11.8"
Expand Down
Loading