aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-12-06 21:25:00 -0800
committerAdam Soltys <[email protected]>2023-12-06 21:25:00 -0800
commitb485a1bfc6dbbf43cca8652b2a509f6b4a30c4f4 (patch)
treea9358f70094660abcd651561207a3e0dc2c98d7f /src
parent6b3ff247e4125941a611369ed9bb74a2ffca57d8 (diff)
downloadcoinos-ui-b485a1bfc6dbbf43cca8652b2a509f6b4a30c4f4.tar.gz
coinos-ui-b485a1bfc6dbbf43cca8652b2a509f6b4a30c4f4.zip
merge fixes
Diffstat (limited to 'src')
-rw-r--r--src/components/AppHeader.svelte41
-rw-r--r--src/routes/(app)/[username]/(profile)/+layout.svelte6
-rw-r--r--src/routes/(app)/[username]/(profile)/+page.svelte30
3 files changed, 17 insertions, 60 deletions
diff --git a/src/components/AppHeader.svelte b/src/components/AppHeader.svelte
index 8aa084c8..d7045d5f 100644
--- a/src/components/AppHeader.svelte
+++ b/src/components/AppHeader.svelte
@@ -109,7 +109,6 @@
><Icon icon="menu" style="mx-auto w-6 md:w-8" />
</button>
-<<<<<<< HEAD
<div
class="{showMenu
? 'block'
@@ -145,47 +144,7 @@
<Avatar user={subject} />
</div>
</header>
-=======
- <div
- class="{showMenu
- ? 'block'
- : 'hidden'} absolute top-14 right-0 bg-white rounded-3xl p-8 shadow-xl z-50"
- >
- <ul class="space-y-5 w-48">
- {#each menuButtons as { href, icon, key }}
- <li>
- <a {href} data-sveltekit-prefetch="off">
- <button
- class="flex justify-center items-center font-semibold hover:opacity-80"
- ><Icon {icon} style="mr-2 w-6 md:w-8" /> {$t(key)}
- </button>
- </a>
- </li>
- {/each}
- </ul>
- <hr class="my-4" />
- <a href="/"
- ><img src="/images/logo.svg" alt="Coinos" class="w-32" /></a
- >
- </div>
- </OutClick>
- </div>
- {:else}
- <a href={`/login?redirect=${$page.url.pathname}`}>
- <button class="bg-white px-5 py-2 rounded-xl font-semibold text-sm"
- >{$t("nav.signIn")}</button
- >
- </a>
- {/if}
- </nav>
- <div
- class="absolute md:w-[64px] md:mx-auto lg:left-[164px] left-[calc(50vw-64px)] -bottom-[64px] z-30"
- >
- <Avatar user={subject} />
- </div>
- </header>
{/if}
->>>>>>> master
<style>
.z {
diff --git a/src/routes/(app)/[username]/(profile)/+layout.svelte b/src/routes/(app)/[username]/(profile)/+layout.svelte
index 32bebe3b..5b3fcfa5 100644
--- a/src/routes/(app)/[username]/(profile)/+layout.svelte
+++ b/src/routes/(app)/[username]/(profile)/+layout.svelte
@@ -12,10 +12,8 @@
let { encode, toWords } = bech32m;
let events, user, subject, src, text;
- let follow = async () => {
- user.follows.push(['p', subject.pubkey, 'wss://nostr.swapee.me', subject.username]);
- update();
- };
+ $: ({ events, user, subject, src, rates, text } = data);
+ $: ({ currency, username: n, display } = subject);
$: username = n.length > 60 ? n.substr(0, 6) : display || n;
$: npub = bech32m.encode(
diff --git a/src/routes/(app)/[username]/(profile)/+page.svelte b/src/routes/(app)/[username]/(profile)/+page.svelte
index 376554b5..e728a336 100644
--- a/src/routes/(app)/[username]/(profile)/+page.svelte
+++ b/src/routes/(app)/[username]/(profile)/+page.svelte
@@ -11,11 +11,11 @@
import { browser } from "$app/environment";
export let data;
- let { messages, notes, invoices, sent, received, subject, user, rates } =
+ let { messages, notes, invoices, sent, received, subject, user, rate, rates } =
data;
$: refresh(data);
let refresh = (d) =>
- ({ messages, notes, invoices, sent, received, subject, user, rates } = d);
+ ({ messages, notes, invoices, sent, received, subject, user, rate, rates } = d);
let keys = new Set();
let latest = [];
@@ -70,7 +70,7 @@
{#if user?.id === subject.id}
<div>
<div class="flex justify-center lg:justify-start mb-8">
- <Balance {user} />
+ <Balance {user} {rate} />
</div>
<div class="space-y-8 mt-8">
{#if !user.balance}
@@ -82,7 +82,7 @@
<div class="flex gap-4 justify-center w-full">
<a href={`/${user.username}/receive`}>
<button
- class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60 bg-black text-white"
+ class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60 bg-black text-white h-14"
>
<div class="mx-auto flex">
<Icon icon="numpad" style="my-auto h-6 mr-2 invert" />
@@ -91,20 +91,20 @@
</button>
</a>
- <a href={`/send`} class="w-full md:w-60">
- <button
- class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-full"
- >
- <div class="mx-auto flex">
- <Icon icon="send" style="my-auto h-6 mr-2" />
- <div class="my-auto">{$t("user.dashboard.send")}</div>
- </div>
- </button>
- </a>
+ <a href={`/send`}>
+ <button
+ class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60 bg-black text-white h-14"
+ >
+ <div class="mx-auto my-auto flex">
+ <Icon icon="send" style="my-auto h-6 mr-2 invert" />
+ <div class="my-auto">{$t("user.dashboard.send")}</div>
+ </div>
+ </button>
+ </a>
<a href={`/buy`}>
<button
- class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60 bg-black text-white"
+ class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60 bg-black text-white h-14"
>
<div class="mx-auto flex">
<!-- <Icon icon="plus" style="my-auto h-6 mr-2" /> -->