Skip to content

Commit

Permalink
show link vs plane text
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkNerdi committed Feb 21, 2024
1 parent 837edd3 commit 682b83e
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
slot="banner"
metadata={dapp.metadata}
{verifiedState}
showLink={false}
classes="bg-surface-1 dark:bg-surface-1-dark pb-4"
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
slot="banner"
metadata={dapp.metadata}
{verifiedState}
showLink={false}
classes="bg-surface-1 dark:bg-surface-1-dark pb-4"
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
slot="banner"
metadata={dapp.metadata}
{verifiedState}
showLink={false}
classes="bg-surface-1 dark:bg-surface-1-dark pb-4"
/>

Expand Down
7 changes: 6 additions & 1 deletion packages/desktop/components/popup/popups/SiwePopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@
}}
busy={isBusy}
>
<DappInfo slot="banner" metadata={dapp.metadata} classes="bg-surface-1 dark:bg-surface-1-dark pb-4" />
<DappInfo
slot="banner"
metadata={dapp.metadata}
showLink={false}
classes="bg-surface-1 dark:bg-surface-1-dark pb-4"
/>

<div class="space-y-5">
<Table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
onClick: closePopup,
}}
>
<DappInfo slot="banner" metadata={dapp.metadata} classes="bg-surface-1 dark:bg-surface-1-dark pb-4" />
<DappInfo
slot="banner"
metadata={dapp.metadata}
showLink={false}
classes="bg-surface-1 dark:bg-surface-1-dark pb-4"
/>
<div slot="description">
<div class="flex flex-col items-center justify-between gap-3">
<SuccessSvg />
Expand Down
14 changes: 10 additions & 4 deletions packages/shared/src/components/molecules/DappInfo.svelte
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<script lang="ts">
import { DappVerification } from '@auxiliary/wallet-connect/enums'
import { CoreTypes } from '@walletconnect/types'
import { Avatar, Icon, IconName, Text } from '@bloomwalletio/ui'
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
export let showLink: boolean = true
export let classes: string = ''
</script>

Expand All @@ -27,9 +29,13 @@
{@const { color, icon } = VERIFICATION_ICONS[verifiedState]}
<Icon name={icon} size="xs" textColor={color} />
{/if}
<Text type="sm" textColor="secondary" truncate>
{metadata.url}
</Text>
{#if showLink}
<Link text={metadata?.url} on:click={() => openUrlInBrowser(metadata.url)} />
{:else}
<Text type="sm" textColor="secondary" truncate>
{metadata.url}
</Text>
{/if}
</div>
{/if}
</div>
Expand Down

0 comments on commit 682b83e

Please sign in to comment.