diff options
| author | Adam Soltys <[email protected]> | 2022-11-03 02:01:55 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-11-03 02:01:55 -0700 |
| commit | 8b866b1a997f72aa9ab629f9af9390dfad9f1424 (patch) | |
| tree | a616bef63cb61f9e623e052401b0452f7309d7ba /src | |
| parent | 067c8d8762e2d039b4cc19cd2fee24e4d07e661a (diff) | |
| download | coinos-ui-8b866b1a997f72aa9ab629f9af9390dfad9f1424.tar.gz coinos-ui-8b866b1a997f72aa9ab629f9af9390dfad9f1424.zip | |
tx labels
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/utils.js | 1 | ||||
| -rw-r--r-- | src/routes/(app)/[username]/transactions/[...page]/+page.svelte | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/utils.js b/src/lib/utils.js index a2829ca4..70aac87e 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -133,6 +133,7 @@ export const f = (s, currency) => export const s = (s) => new Intl.NumberFormat('en-US', { maximumFractionDigits: 0 }).format(s); export const sat = (s) => { + s = Math.abs(s); let p = Math.floor(Math.log(s) / Math.LN10 + 0.000000001); let d = Math.floor((p + 1) / 3); diff --git a/src/routes/(app)/[username]/transactions/[...page]/+page.svelte b/src/routes/(app)/[username]/transactions/[...page]/+page.svelte index efecbaf2..91429917 100644 --- a/src/routes/(app)/[username]/transactions/[...page]/+page.svelte +++ b/src/routes/(app)/[username]/transactions/[...page]/+page.svelte @@ -121,12 +121,19 @@ {#if tx.with} <a href={`/${tx.with.username}`} class="mx-auto"> <div class="flex"> + <div class="my-auto text-secondary"> + {tx.amount > 0 ? 'From' : 'To'} + </div> <div class="my-auto"> <Avatar user={tx.with} size={12} /> </div> - <div class="my-auto ml-1">{tx.with.username}</div> + <div class="my-auto ml-1 text-secondary">{tx.with.username}</div> </div> </a> + {:else} + <div class="mx-auto text-secondary"> + {tx.amount > 0 ? 'Received' : 'Sent'} + </div> {/if} </div> |
