From 766c6ef61ea76ee4fa753ee76bbadeaa13434931 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 12 Mar 2025 11:43:57 -0700 Subject: copy peanut --- .../(app)/ecash/[id]/[...version]/+page.svelte | 33 +++++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/routes/(app)/ecash/[id]/[...version]/+page.svelte b/src/routes/(app)/ecash/[id]/[...version]/+page.svelte index b98e6bfa..e1a38235 100644 --- a/src/routes/(app)/ecash/[id]/[...version]/+page.svelte +++ b/src/routes/(app)/ecash/[id]/[...version]/+page.svelte @@ -8,6 +8,24 @@ let link = $page.url.href; let { id, total, token, external, spent } = $state(data); + + let peanut = $derived( + "🥜" + + Array.from(token) + .map((char) => { + const byteValue = char.charCodeAt(0); + // For byte values 0-15, use Variation Selectors (VS1-VS16): U+FE00 to U+FE0F + if (byteValue >= 0 && byteValue <= 15) { + return String.fromCodePoint(0xfe00 + byteValue); + } + + // For byte values 16-255, use Variation Selectors Supplement (VS17-VS256): U+E0100 to U+E01EF + if (byteValue >= 16 && byteValue <= 255) { + return String.fromCodePoint(0xe0100 + (byteValue - 16)); + } + }) + .join(""), + ); {#if form?.error} @@ -24,15 +42,21 @@
{$t("payments.shareLink")}
+ + {#if spent < total} {#if external} @@ -40,11 +64,12 @@
-- cgit v1.2.3