diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/[username]/dashboard.svelte | 8 | ||||
| -rw-r--r-- | src/routes/[username]/settings.svelte | 9 | ||||
| -rw-r--r-- | src/routes/[username]/transactions.svelte | 19 |
3 files changed, 24 insertions, 12 deletions
diff --git a/src/routes/[username]/dashboard.svelte b/src/routes/[username]/dashboard.svelte index 6f38a812..11295728 100644 --- a/src/routes/[username]/dashboard.svelte +++ b/src/routes/[username]/dashboard.svelte @@ -56,14 +56,12 @@ > <span class="text-secondary text-xl block" - >{accountBalanceBtc} BTC ({accountBalanceSats} SATS) + >{accountBalanceSats} SATS </span> <button class="rounded-full border py-2 font-bold w-28 mt-4">Withdraw</button> - <p class="text-secondary mt-2 w-full md:w-[550px]"> - You will be charged a 1% withdrawal fee (<span class="text-black" - >{$rate ? feeAmount : 'fetching rate...'}</span - >) on your balance. + <p class="text-secondary mt-2"> + You will be charged a 1% withdrawal fee on the amount. </p> </div> </div> diff --git a/src/routes/[username]/settings.svelte b/src/routes/[username]/settings.svelte index ae8e91c1..82ed7305 100644 --- a/src/routes/[username]/settings.svelte +++ b/src/routes/[username]/settings.svelte @@ -72,6 +72,15 @@ </div> <div> + <label for="address" class="font-bold mb-1 block">Business Address</label> + <input + type="text" + name="address" + class="block border rounded-xl p-3 w-full" + /> + </div> + + <div> <div class="flex justify-between items-center"> <span class="font-bold">Email Notifications</span> <Toggle id="email-notify" /> diff --git a/src/routes/[username]/transactions.svelte b/src/routes/[username]/transactions.svelte index 0e635298..24e3e146 100644 --- a/src/routes/[username]/transactions.svelte +++ b/src/routes/[username]/transactions.svelte @@ -16,30 +16,35 @@ </h1> <div class="max-w-5xl w-11/12 md:w-3/4 xl:w-1/2 mx-auto md:text-lg"> - <div class="text-secondary flex justify-between mb-5"> + <div class="text-secondary grid grid-cols-3 mb-5"> <h2>AMOUNT</h2> - <h2>TIME</h2> + <h2 class='text-center'>TYPE</h2> + <h2 class='text-right'>TIME</h2> </div> <div class="space-y-10"> {#if transactions.length} {#each transactions as tx} - <div class="flex justify-between items-center border-b pb-5"> + <div class="grid grid-cols-3 border-b pb-5"> <div class="font-bold"> <span class="block mb-1" - >{new Intl.NumberFormat('en-US', { + >{tx.amount > 0 && '+'}{new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(tx.amount * (tx.rate / 100000000))} </span> <span class="text-secondary" - >({new Intl.NumberFormat('en-US', { maximumFractionDigits: 0 }).format(tx.amount)} - SATS) + >{new Intl.NumberFormat('en-US', { maximumFractionDigits: 0 }).format(tx.amount)} + SATS </span> </div> - <div class="text-secondary"> + <div class='text-center'> + <span class="text-secondary">{tx.amount < 0 ? 'Sent' : 'Received'}</span> + </div> + + <div class="text-secondary text-right"> {new Date(tx.createdAt).toLocaleDateString(undefined, { dateStyle: 'medium' })} </div> </div> |
