aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/AppHeader.svelte9
-rw-r--r--src/locales/en.json30
-rw-r--r--src/routes/(app)/[username]/(profile)/+layout.svelte32
-rw-r--r--src/routes/(app)/[username]/(profile)/+page.svelte20
-rw-r--r--src/routes/(app)/[username]/funds/+page.server.js0
-rw-r--r--src/routes/(app)/[username]/funds/+page.svelte56
-rw-r--r--src/routes/(app)/fund/[id]/+page.server.js (renamed from src/routes/(app)/funds/[id]/+page.server.js)0
-rw-r--r--src/routes/(app)/fund/[id]/+page.svelte (renamed from src/routes/(app)/funds/[id]/+page.svelte)0
-rw-r--r--src/routes/(app)/fund/[id]/sweep/+page.server.js (renamed from src/routes/(app)/funds/[id]/sweep/+page.server.js)0
-rw-r--r--src/routes/(app)/fund/[id]/sweep/+page.svelte (renamed from src/routes/(app)/funds/[id]/sweep/+page.svelte)0
-rw-r--r--src/routes/(app)/fund/[id]/withdraw/+page.server.js (renamed from src/routes/(app)/funds/[id]/withdraw/+page.server.js)0
-rw-r--r--src/routes/(app)/fund/[id]/withdraw/+page.svelte (renamed from src/routes/(app)/funds/[id]/withdraw/+page.svelte)0
-rw-r--r--src/routes/(app)/fund/[id]/withdraw/+server.js (renamed from src/routes/(app)/funds/[id]/withdraw/+server.js)0
-rw-r--r--src/routes/(app)/send/[...text]/+page.svelte2
-rw-r--r--src/routes/+page.svelte2
15 files changed, 92 insertions, 59 deletions
diff --git a/src/components/AppHeader.svelte b/src/components/AppHeader.svelte
index 4ee0c4a7..4ccd2d03 100644
--- a/src/components/AppHeader.svelte
+++ b/src/components/AppHeader.svelte
@@ -17,10 +17,7 @@
menuButtons = [
{ key: 'nav.settings', icon: 'settings', href: `/${user.username}/settings` },
{ key: 'nav.support', icon: 'support', href: `/support` },
- { key: 'nav.funds', icon: 'fund', href: `/${user.username}/funds` },
- { key: 'nav.map', icon: 'map', href: `/${user.username}/map` },
- { key: 'nav.merch', icon: 'shirt', href: `https://coinosmerch.com` },
- { key: 'nav.signOut', icon: 'logout', href: `/logout` }
+ { key: 'nav.signOut', icon: 'logout', href: `/logout` },
];
let showMenu = false;
@@ -56,7 +53,7 @@
.url.pathname === `/${user.username}/receive`
? 'opacity-100'
: 'opacity-70 hover:opacity-80'}"
- ><Icon icon="numpad" style="mx-auto w-6 md:w-8" />
+ ><Icon icon="receive" style="mx-auto w-6 md:w-8" />
</button>
</a>
<a href={`/${user.username}/payments`}>
@@ -116,8 +113,6 @@
</li>
{/each}
</ul>
- <hr class="my-4" />
- <a href="/"><img src="/images/logo.svg" alt="Coinos" class="w-32" /></a>
</div>
</OutClick>
</div>
diff --git a/src/locales/en.json b/src/locales/en.json
index 7aa157d1..9ecd3702 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -31,21 +31,13 @@
},
"faq": {
"header": "FAQ",
- "why": {
- "question": "Why accept Bitcoin?",
- "answer": "With Bitcoin, merchants save on fees, consumers gain privacy and savers gain purchasing power. We'll promote your business to an enthusiastic community that prefers to shop at places that take Bitcoin."
- },
"cost": {
"question": "What does it cost?",
- "answer": "Receiving payments into your account is free. Withdrawals to external wallets incur a small fee that varies depending on network conditions. We charge 0.1% to convert between lightning and on-chain Bitcoin. Sending to other Coinos accounts is free."
- },
- "individuals": {
- "question": "Who can use it?",
- "answer": "Anyone, anywhere in the world. Coinos is suitable for individuals and businesses."
+ "answer": "Receiving payments into your account is free. Withdrawals to external wallets incur a small fee that varies depending on network conditions."
},
"compatibility": {
"question": "Do I need any special device or software?",
- "answer": "No, Coinos is a web app that works anywhere that has Internet. Merchants might use it on a tablet or put up a QR code for customers to scan with their phone."
+ "answer": "No, Coinos works anywhere that has Internet. Merchants might use it on a tablet or put up a QR code for customers to scan with their phone."
},
"safety": {
"question": "When do my funds settle?",
@@ -55,14 +47,6 @@
"question": "Can Coinos integrate with my existing PoS?",
"answer": "We recommend entering sales into your existing PoS as cash transactions."
},
- "accounting": {
- "question": "What about accounting?",
- "answer": "We display all payments in terms of your local currency and let you filter by date so you can report your income as normal. You can export your account history to a csv file. If you sell Bitcoin for a profit you may wish to report capital gains."
- },
- "offramp": {
- "question": "Can I convert the Bitcoin I receive to my local currency?",
- "answer": "You can withdraw your funds at any time to an exchange or brokerage to sell your Bitcoin and receive a bank transfer. We may be willing to provide direct settlement via e-transfer to select Canadian merchants."
- },
"bitcoin": {
"question": "What can I do with Bitcoin?",
"answer": "Spend it at other merchants or pay your expenses with it by getting your staff, suppliers and landlord to take it."
@@ -146,14 +130,17 @@
"failed": "Login failed"
},
"nav": {
+ "about": "About",
+ "docs": "Docs",
+ "messages": "Messages",
"funds": "Funds",
"map": "Map",
- "merch": "Merch",
+ "merch": "Shop",
"profile": "Profile",
"startInSeconds": "Start in Seconds",
"account": "Account",
"signIn": "Sign In",
- "signOut": "Sign Out",
+ "signOut": "Sign out",
"dashboard": "Dashboard",
"settings": "Settings",
"support": "Support"
@@ -203,7 +190,7 @@
},
"send": {
"contacts": "Contacts",
- "scan": "Scan QR",
+ "scan": "Scan",
"paste": "Paste",
"next": "Next",
"placeholder": "Paste a bitcoin address, lightning invoice or coinos username"
@@ -265,6 +252,7 @@
}
},
"payments": {
+ "create": "Create",
"fund": "Fund",
"addFunds": "Add Funds",
"takeFunds": "Take Funds",
diff --git a/src/routes/(app)/[username]/(profile)/+layout.svelte b/src/routes/(app)/[username]/(profile)/+layout.svelte
index 35c316bb..8790aaf2 100644
--- a/src/routes/(app)/[username]/(profile)/+layout.svelte
+++ b/src/routes/(app)/[username]/(profile)/+layout.svelte
@@ -17,7 +17,7 @@
$: ({ currency, username: n, display } = subject);
$: username = n.length > 60 ? n.substr(0, 6) : display || n;
- $: npub = bech32m.encode('npub', toWords(hexToUint8Array(user.pubkey)), 180);
+ $: npub = bech32m.encode('npub', toWords(hexToUint8Array(subject.pubkey)), 180);
$: lnaddr = `${n}@${$page.url.host}`;
$: profile = `${$page.url.host}/${n}`;
@@ -147,7 +147,7 @@
{#if following}
<div class="w-full flex">
<button
- class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60 bg-black text-white"
+ class="mx-auto rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60 bg-black text-white"
on:click={unfollow}
>
<div class="mx-auto flex">
@@ -159,7 +159,7 @@
{:else}
<div class="w-full flex">
<button
- class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60"
+ class="mx-auto rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60"
on:click={follow}
>
<div class="mx-auto flex">
@@ -171,29 +171,29 @@
{/if}
{/if}
- {#if !subject.anon && subject.username !== user?.username}
- <div class="w-full flex">
- <a
- href={user ? `/send/${subject.username}` : `/${subject.username}/receive`}
- class="mx-auto"
- >
+ {#if user && user.username !== subject.username && subject.pubkey}
+ <div class="w-full flex mb-4">
+ <a href={`/${subject.username}/messages`} class="mx-auto">
<button class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60">
<div class="mx-auto flex">
- <Icon icon="send" style="mr-2" />
- <div class="mt-1">{$t('user.pay')}</div>
+ <Icon icon="support" style="mr-2 my-auto" />
+ <div class="mt-1 my-auto">{$t('user.message')}</div>
</div>
</button>
</a>
</div>
{/if}
- {#if user && user.username !== subject.username && subject.pubkey}
+ {#if !subject.anon && subject.username !== user?.username}
<div class="w-full flex">
- <a href={`/${subject.username}/messages`} class="mx-auto">
+ <a
+ href={user ? `/send/${subject.username}` : `/${subject.username}/receive`}
+ class="mx-auto"
+ >
<button class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60">
<div class="mx-auto flex">
- <Icon icon="support" style="mr-2 my-auto" />
- <div class="mt-1 my-auto">{$t('user.message')}</div>
+ <Icon icon="send" style="mr-2" />
+ <div class="mt-1">{$t('user.pay')}</div>
</div>
</button>
</a>
@@ -203,7 +203,7 @@
</div>
<div class="w-full">
- <div class="mx-auto space-y-5 lg:max-w-lg xl:max-w-2xl lg:pl-10">
+ <div class="mx-auto space-y-5 lg:max-w-xl lg:pl-10 xl:max-w-2xl lg:pl-10">
<slot />
</div>
</div>
diff --git a/src/routes/(app)/[username]/(profile)/+page.svelte b/src/routes/(app)/[username]/(profile)/+page.svelte
index 84aa4425..180b12bd 100644
--- a/src/routes/(app)/[username]/(profile)/+page.svelte
+++ b/src/routes/(app)/[username]/(profile)/+page.svelte
@@ -96,21 +96,21 @@
<div class="flex flex-wrap gap-4 justify-center w-full">
<a href={`/${user.username}/receive`} class="w-full md:w-60">
<button
- class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-full md:w-60"
+ class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-full"
>
<div class="mx-auto flex">
- <Icon icon="numpad" style="my-auto h-6 mr-2" />
- <div class="my-auto mt-1">{$t('user.requestPayment')}</div>
+ <Icon icon="receive" style="my-auto h-6 mr-2" />
+ <div class="my-auto mt-1">{$t('user.dashboard.receive')}</div>
</div>
</button>
</a>
- <a href={`/scan`} class="w-full md:w-60">
+ <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 md:w-60"
+ class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-full"
>
<div class="mx-auto flex">
- <Icon icon="scan" style="my-auto h-6 mr-2" />
- <div class="my-auto mt-1">{$t('user.send.scan')}</div>
+ <Icon icon="send" style="my-auto h-6 mr-2" />
+ <div class="my-auto mt-1">{$t('user.dashboard.send')}</div>
</div>
</button>
</a>
@@ -225,9 +225,3 @@
</div>
{/if}
</div>
-
-<style>
- h1 {
- @apply mb-2;
- }
-</style>
diff --git a/src/routes/(app)/[username]/funds/+page.server.js b/src/routes/(app)/[username]/funds/+page.server.js
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/src/routes/(app)/[username]/funds/+page.server.js
diff --git a/src/routes/(app)/[username]/funds/+page.svelte b/src/routes/(app)/[username]/funds/+page.svelte
new file mode 100644
index 00000000..6479fb8b
--- /dev/null
+++ b/src/routes/(app)/[username]/funds/+page.svelte
@@ -0,0 +1,56 @@
+<script>
+ import { Avatar, Icon } from '$comp';
+ import { t } from '$lib/translations';
+
+ export let data;
+
+ let { funds } = data;
+</script>
+
+<div class="mt-24 mb-20">
+ <h1 class="px-3 md:px-0 text-center text-3xl md:text-4xl font-semibold mb-10">
+ Funds
+ </h1>
+
+ <div class="container w-full mx-auto text-lg px-4 max-w-xl space-y-5">
+ <div class="text-base">
+ <div class="grid grid-cols-3 border-b h-24 hover:bg-gray-100 px-4">
+ <div class="whitespace-nowrap my-auto">
+
+ <div class="text-secondary">
+
+ </div>
+ </div>
+
+ <div class="flex my-auto">
+ <div class="text-secondary flex">
+ <div class="my-auto mr-1">
+ <img src="/images/moneypot.png" class="w-12" alt="Pot" />
+ </div>
+
+ <div class="my-auto">Pot</div>
+ </div>
+ </div>
+
+ <div class="text-secondary text-right text-sm my-auto">
+ <div>
+
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <button
+ class="ml-auto rounded-full border py-2 px-4 w-36 hover:opacity-80 flex mx-auto"
+ >
+ <Icon icon="plus" style="opacity-50 mr-2 my-auto" />
+ <div class="my-auto">{$t('payments.create')}</div>
+ </button>
+ </div>
+</div>
+
+<style>
+ .active * {
+ @apply bg-black text-white border-black;
+ }
+</style>
diff --git a/src/routes/(app)/funds/[id]/+page.server.js b/src/routes/(app)/fund/[id]/+page.server.js
index 4194deed..4194deed 100644
--- a/src/routes/(app)/funds/[id]/+page.server.js
+++ b/src/routes/(app)/fund/[id]/+page.server.js
diff --git a/src/routes/(app)/funds/[id]/+page.svelte b/src/routes/(app)/fund/[id]/+page.svelte
index d2d3079c..d2d3079c 100644
--- a/src/routes/(app)/funds/[id]/+page.svelte
+++ b/src/routes/(app)/fund/[id]/+page.svelte
diff --git a/src/routes/(app)/funds/[id]/sweep/+page.server.js b/src/routes/(app)/fund/[id]/sweep/+page.server.js
index 9fd244a3..9fd244a3 100644
--- a/src/routes/(app)/funds/[id]/sweep/+page.server.js
+++ b/src/routes/(app)/fund/[id]/sweep/+page.server.js
diff --git a/src/routes/(app)/funds/[id]/sweep/+page.svelte b/src/routes/(app)/fund/[id]/sweep/+page.svelte
index 64bed4dd..64bed4dd 100644
--- a/src/routes/(app)/funds/[id]/sweep/+page.svelte
+++ b/src/routes/(app)/fund/[id]/sweep/+page.svelte
diff --git a/src/routes/(app)/funds/[id]/withdraw/+page.server.js b/src/routes/(app)/fund/[id]/withdraw/+page.server.js
index 476149f2..476149f2 100644
--- a/src/routes/(app)/funds/[id]/withdraw/+page.server.js
+++ b/src/routes/(app)/fund/[id]/withdraw/+page.server.js
diff --git a/src/routes/(app)/funds/[id]/withdraw/+page.svelte b/src/routes/(app)/fund/[id]/withdraw/+page.svelte
index 9cad945a..9cad945a 100644
--- a/src/routes/(app)/funds/[id]/withdraw/+page.svelte
+++ b/src/routes/(app)/fund/[id]/withdraw/+page.svelte
diff --git a/src/routes/(app)/funds/[id]/withdraw/+server.js b/src/routes/(app)/fund/[id]/withdraw/+server.js
index 0f9a23f3..0f9a23f3 100644
--- a/src/routes/(app)/funds/[id]/withdraw/+server.js
+++ b/src/routes/(app)/fund/[id]/withdraw/+server.js
diff --git a/src/routes/(app)/send/[...text]/+page.svelte b/src/routes/(app)/send/[...text]/+page.svelte
index de84c287..b2c9616c 100644
--- a/src/routes/(app)/send/[...text]/+page.svelte
+++ b/src/routes/(app)/send/[...text]/+page.svelte
@@ -61,7 +61,7 @@
type="button"
class="flex border rounded-full px-6 py-2 font-bold hover:opacity-80 mr-1"
>
- <Icon icon="scan" style="mr-2 w-6 my-auto" />
+ <Icon icon="camera" style="mr-2 w-6 my-auto" />
<div class="my-auto">{$t('user.send.scan')}</div>
</button>
</a>
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index ec9f55b7..0aaf887d 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -89,7 +89,7 @@
<div>
<div class="space-y-10">
- <h3 class="text-5xl font-medium text-center">{$t('faq.header')}</h3>
+ <h3 class="text-5xl font-medium text-center pt-40 -mt-40" id="faq">{$t('faq.header')}</h3>
{#each Object.keys(faqs).filter((f) => f !== 'header') as faqID}
<FaqCard questionID={faqID} />
{/each}