Revert "Add QR codes for Monero address and subaddresses"
This reverts commit 95aebfe690.
This commit is contained in:
@@ -1,22 +0,0 @@
|
|||||||
<script lang="ts">
|
|
||||||
import QRCode from 'qrcode'
|
|
||||||
|
|
||||||
let { text, size = 128 }: { text: string; size?: number } = $props()
|
|
||||||
|
|
||||||
let dataUrl = $state('')
|
|
||||||
|
|
||||||
$effect(() => {
|
|
||||||
if (!text) return
|
|
||||||
QRCode.toDataURL(text, {
|
|
||||||
width: size,
|
|
||||||
margin: 1,
|
|
||||||
color: { dark: '#000', light: '#fff' },
|
|
||||||
}).then((url) => {
|
|
||||||
dataUrl = url
|
|
||||||
})
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{#if dataUrl}
|
|
||||||
<img src={dataUrl} alt="QR code" {width} {height} class="rounded-md" />
|
|
||||||
{/if}
|
|
||||||
@@ -15,7 +15,6 @@
|
|||||||
import Fingerprint from '@lucide/svelte/icons/fingerprint'
|
import Fingerprint from '@lucide/svelte/icons/fingerprint'
|
||||||
import SettingsIcon from '@lucide/svelte/icons/settings'
|
import SettingsIcon from '@lucide/svelte/icons/settings'
|
||||||
import Loader from '$lib/components/loader.svelte'
|
import Loader from '$lib/components/loader.svelte'
|
||||||
import QrCode from '$lib/components/qr.svelte'
|
|
||||||
import { navigate } from 'sv-router/generated'
|
import { navigate } from 'sv-router/generated'
|
||||||
|
|
||||||
const w = moneroWallet
|
const w = moneroWallet
|
||||||
@@ -195,13 +194,8 @@
|
|||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<div class="mb-4 space-y-1">
|
<div class="mb-4 space-y-1">
|
||||||
<div class="flex items-start gap-3">
|
<p class="font-medium text-xs">Address</p>
|
||||||
<QrCode text={w.address} size={128} />
|
<p class="font-mono text-xs break-all">{w.address}</p>
|
||||||
<div class="min-w-0 flex-1 space-y-1">
|
|
||||||
<p class="font-medium text-xs">Address</p>
|
|
||||||
<p class="font-mono text-xs break-all">{w.address}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<p class="mt-2 font-medium text-xs">Balance</p>
|
<p class="mt-2 font-medium text-xs">Balance</p>
|
||||||
<p class="font-mono text-lg">{w.balance} XMR</p>
|
<p class="font-mono text-lg">{w.balance} XMR</p>
|
||||||
{#if w.unlockedAtomic !== w.balAtomic}
|
{#if w.unlockedAtomic !== w.balAtomic}
|
||||||
@@ -305,20 +299,15 @@
|
|||||||
{#if account.subaddresses.length > 1}
|
{#if account.subaddresses.length > 1}
|
||||||
<div class="space-y-1 border-t border-border pt-2">
|
<div class="space-y-1 border-t border-border pt-2">
|
||||||
<p class="text-xs text-muted-foreground mb-1">Subaddresses</p>
|
<p class="text-xs text-muted-foreground mb-1">Subaddresses</p>
|
||||||
{#each account.subaddresses as sub}
|
{#each account.subaddresses as sub}
|
||||||
<div class="rounded-sm bg-background px-2 py-1.5 text-xs">
|
<div class="rounded-sm bg-background px-2 py-1.5 text-xs">
|
||||||
<div class="flex items-start gap-2">
|
<div class="flex items-center justify-between">
|
||||||
<QrCode text={sub.address} size={64} />
|
<p class="font-medium">#{sub.index}{sub.label ? ` - ${sub.label}` : ''}</p>
|
||||||
<div class="min-w-0 flex-1">
|
<p class="text-muted-foreground">{atomicToXmr(sub.balance)} XMR</p>
|
||||||
<div class="flex items-center justify-between">
|
|
||||||
<p class="font-medium">#{sub.index}{sub.label ? ` - ${sub.label}` : ''}</p>
|
|
||||||
<p class="text-muted-foreground">{atomicToXmr(sub.balance)} XMR</p>
|
|
||||||
</div>
|
|
||||||
<p class="font-mono text-muted-foreground/50 truncate mt-0.5">{sub.address}</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
<p class="font-mono text-muted-foreground/50 truncate">{sub.address}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{/each}
|
||||||
{/each}
|
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user