aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes
diff options
context:
space:
mode:
authorsecondl1ght <[email protected]>2022-08-21 20:53:21 -0400
committersecondl1ght <[email protected]>2022-08-21 20:53:21 -0400
commit48c99c6a701a210889c7e8d3021825de0abbff8c (patch)
tree677e10a185cfce9b5e015f716873fd7ef47d2d00 /src/routes
parent9c98f3472868bb085fd60279f125887c54cbfcb3 (diff)
downloadcoinos-ui-48c99c6a701a210889c7e8d3021825de0abbff8c.tar.gz
coinos-ui-48c99c6a701a210889c7e8d3021825de0abbff8c.zip
remove leaflet and run format
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/+error.svelte8
-rw-r--r--src/routes/+layout.svelte8
-rw-r--r--src/routes/+page.svelte24
-rw-r--r--src/routes/[username]/+page.server.js2
-rw-r--r--src/routes/[username]/+page.svelte2
-rw-r--r--src/routes/[username]/dashboard/+page.svelte16
-rw-r--r--src/routes/[username]/receive/+page.svelte5
-rw-r--r--src/routes/[username]/settings/+page.svelte20
-rw-r--r--src/routes/[username]/support/+page.svelte6
-rw-r--r--src/routes/[username]/transactions/+page.svelte6
-rw-r--r--src/routes/invoice/[id]/+page.svelte9
-rw-r--r--src/routes/jobs/+page.svelte8
-rw-r--r--src/routes/login/+page.server.js2
-rw-r--r--src/routes/register/+page.server.js4
14 files changed, 65 insertions, 55 deletions
diff --git a/src/routes/+error.svelte b/src/routes/+error.svelte
index 2a8846c3..2bacc8a6 100644
--- a/src/routes/+error.svelte
+++ b/src/routes/+error.svelte
@@ -1,7 +1,7 @@
<script>
- import { page } from '$app/stores';
+ import { page } from '$app/stores';
import { Icon, PageNotFound } from '$comp';
- import { _ } from 'svelte-i18n';
+ import { _ } from 'svelte-i18n';
</script>
{#if $page.error.message.includes('not found') || $page.status === 404}
@@ -15,9 +15,9 @@
<Icon icon="error" style="mx-auto w-56" />
- <h1 class="font-bold text-5xl">{$_('error.header'), { default: "Error" }}</h1>
+ <h1 class="font-bold text-5xl">{($_('error.header'), { default: 'Error' })}</h1>
<p class="px-1 w-full md:w-96 break-all font-bold">{$page.error.message.toUpperCase()}</p>
- <p>{$_('error.message'), { default: "Please try again or contact support." }}</p>
+ <p>{($_('error.message'), { default: 'Please try again or contact support.' })}</p>
</div>
</div>
{/if}
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index f2624613..12db17c3 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -11,11 +11,11 @@
import { goto } from '$app/navigation';
import { LoadingSplash } from '$comp';
import { warning, protectedRoutes } from '$lib/utils';
- import { _ } from 'svelte-i18n';
+ import { _ } from 'svelte-i18n';
- $: $token = data.token
+ $: $token = data.token;
- export let data;
+ export let data;
let ready = false;
@@ -28,7 +28,7 @@
});
if (protectedRoutes.find((p) => $page.url.pathname.match(p))) {
- console.log("TOKEN", $token)
+ console.log('TOKEN', $token);
if (!$token) {
goto('/login');
warning($_('error.signIn'));
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index 6bdd9699..bb5df050 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -10,7 +10,7 @@
Footer
} from '$comp';
- import { _ } from 'svelte-i18n';
+ import { _ } from 'svelte-i18n';
let howItWorks;
let faq;
@@ -22,7 +22,7 @@
{ image: 'smile', stepID: 'step3' }
];
- const faqIDs = ["cost", "compatibility", "safety"];
+ const faqIDs = ['cost', 'compatibility', 'safety'];
</script>
<LandingHeader {howItWorks} {faq} {about} />
@@ -34,28 +34,24 @@
<!-- landing info 1 -->
<LandingInfoCard
image="lightning-qr"
- title={$_('landing.info1.title')}
- description={$_('landing.info1.description')}
+ title={$_('landing.info1.title')}
+ description={$_('landing.info1.description')}
/>
<!-- landing info 2 -->
- <LandingInfoCard
- image="phone-checkout"
- title={$_('landing.info2.title')}
- order="reverse"
- >
- {$_('landing.info2.description1')}
+ <LandingInfoCard image="phone-checkout" title={$_('landing.info2.title')} order="reverse">
+ {$_('landing.info2.description1')}
<br /><br />
- {$_('landing.info2.description2')}
+ {$_('landing.info2.description2')}
<br /><br />
- {@html $_('landing.info2.description3')}
+ {@html $_('landing.info2.description3')}
</LandingInfoCard>
<!-- landing info 3 -->
<div>
<LandingInfoCard
image="customize"
- title={$_('landing.info3.title')}
+ title={$_('landing.info3.title')}
description={$_('landing.info3.description')}
/>
<div bind:this={howItWorks} />
@@ -79,7 +75,7 @@
<div class="space-y-10">
<h3 class="text-5xl font-medium text-center">{$_('faq.header')}</h3>
{#each faqIDs as faqID}
- <FaqCard questionID={faqID} />
+ <FaqCard questionID={faqID} />
{/each}
</div>
<div bind:this={about} />
diff --git a/src/routes/[username]/+page.server.js b/src/routes/[username]/+page.server.js
index e31a28c0..458b1db0 100644
--- a/src/routes/[username]/+page.server.js
+++ b/src/routes/[username]/+page.server.js
@@ -10,7 +10,7 @@ export async function load({ params }) {
body = {};
}
- console.log("BODY", body)
+ console.log('BODY', body);
return body;
}
diff --git a/src/routes/[username]/+page.svelte b/src/routes/[username]/+page.svelte
index 6d93ba23..ed428d46 100644
--- a/src/routes/[username]/+page.svelte
+++ b/src/routes/[username]/+page.svelte
@@ -4,7 +4,7 @@
import { AppHeader, Icon, PageNotFound } from '$comp';
import { user } from '$lib/store';
import { copy } from '$lib/utils';
- import { _ } from 'svelte-i18n';
+ import { _ } from 'svelte-i18n';
export let data;
let lightningAddress = `${data?.username}@coinos.io`;
diff --git a/src/routes/[username]/dashboard/+page.svelte b/src/routes/[username]/dashboard/+page.svelte
index 3553661a..9e09aa16 100644
--- a/src/routes/[username]/dashboard/+page.svelte
+++ b/src/routes/[username]/dashboard/+page.svelte
@@ -3,7 +3,7 @@
import { tick } from 'svelte';
import { AppHeader, Icon } from '$comp';
import { rate, user, preferredCurrency } from '$lib/store';
- import { _ } from 'svelte-i18n';
+ import { _ } from 'svelte-i18n';
let payreq = '',
payreqField,
@@ -63,14 +63,12 @@
</h1>
{#if !withdrawing}
<span class="text-secondary mx-auto text-lg font-bold"
- >{$_('user.dashboard.bitcoinPrice')}
- <span class="text-black">{$rate ? btcPrice : $_('user.dashboard.fetchingRate')}</span>
+ >{$_('user.dashboard.bitcoinPrice')}
+ <span class="text-black">{$rate ? btcPrice : $_('user.dashboard.fetchingRate')}</span>
{$preferredCurrency}
</span>
- <span class="text-secondary block mt-1"
- >{@html $_('user.dashboard.dataFromBinance')}
- </span>
+ <span class="text-secondary block mt-1">{@html $_('user.dashboard.dataFromBinance')} </span>
<h3 class="text-secondary font-bold border-b pb-1 mt-10 mb-6 w-full md:w-[500px]">
{$_('user.dashboard.ACCOUNT_BALANCE')}
@@ -83,7 +81,7 @@
<span class="text-secondary text-xl block">{accountBalanceSats} SAT</span>
<button class="rounded-full border py-2 font-bold w-28 mt-4" on:click={toggle}
- >{$_('user.dashboard.withdraw')}</button
+ >{$_('user.dashboard.withdraw')}</button
>
<p class="text-secondary my-2">{$_('user.dashboard.conversionFeeWarning')}</p>
{:else}
@@ -105,7 +103,9 @@
</div>
<div>
- <label for="note" class="font-bold mb-1 block">{$_('user.dashboard.optionalNote')}</label>
+ <label for="note" class="font-bold mb-1 block"
+ >{$_('user.dashboard.optionalNote')}</label
+ >
<textarea name="note" rows={2} class="block rounded-2xl p-3 w-full bg-primary" />
</div>
diff --git a/src/routes/[username]/receive/+page.svelte b/src/routes/[username]/receive/+page.svelte
index 783ae0a3..6d750d1b 100644
--- a/src/routes/[username]/receive/+page.svelte
+++ b/src/routes/[username]/receive/+page.svelte
@@ -5,7 +5,7 @@
import { invoiceAmount, invoiceAmountFiat, rate, user } from '$lib/store';
import { post, warning } from '$lib/utils';
import { page } from '$app/stores';
- import { _, number } from 'svelte-i18n';
+ import { _, number } from 'svelte-i18n';
let useFiat = true;
let amountFiat = 0;
@@ -157,7 +157,8 @@
? 'opacity-50'
: 'opacity-100'}"
on:click={submit}
- disabled={$invoiceAmount === 0}><Icon icon="qr" style="mr-2" /> {$_('user.receive.showQR')}</button
+ disabled={$invoiceAmount === 0}
+ ><Icon icon="qr" style="mr-2" /> {$_('user.receive.showQR')}</button
>
<!--
<button
diff --git a/src/routes/[username]/settings/+page.svelte b/src/routes/[username]/settings/+page.svelte
index ac7804a0..9644c3ac 100644
--- a/src/routes/[username]/settings/+page.svelte
+++ b/src/routes/[username]/settings/+page.svelte
@@ -1,7 +1,7 @@
<script>
import { AppHeader, Icon, Toggle, LocaleSelector } from '$comp';
import { user, colorTheme } from '$lib/store';
- import { _ } from 'svelte-i18n';
+ import { _ } from 'svelte-i18n';
let setting = 'account';
let password;
@@ -28,7 +28,9 @@
<AppHeader />
<div class="my-20 px-3 md:px-0 w-full md:w-[400px] mx-auto space-y-8">
- <h1 class="text-center text-3xl md:text-4xl font-semibold mb-10">{$_('user.settings.header')}</h1>
+ <h1 class="text-center text-3xl md:text-4xl font-semibold mb-10">
+ {$_('user.settings.header')}
+ </h1>
<div class="font-bold flex justify-between items-center border-b pb-3 text-secondary">
<button class:selected={setting === 'account'} on:click={() => (setting = 'account')}
@@ -62,7 +64,9 @@
</div>
<div class="relative">
- <label for="password" class="block font-bold block mb-1">{$_('user.settings.newPassword')}</label>
+ <label for="password" class="block font-bold block mb-1"
+ >{$_('user.settings.newPassword')}</label
+ >
{#if revealPassword}
<input type="text" class="block border rounded-xl p-3 w-full" bind:value={password} />
{:else}
@@ -78,7 +82,9 @@
</div>
<div>
- <label for="address" class="font-bold mb-1 block">{$_('user.settings.businessAddress')}</label>
+ <label for="address" class="font-bold mb-1 block"
+ >{$_('user.settings.businessAddress')}</label
+ >
<input type="text" name="address" class="block border rounded-xl p-3 w-full" />
</div>
@@ -88,7 +94,7 @@
<Toggle id="email-notify" />
</div>
<p class="text-secondary mt-1 w-9/12">
- {$_('user.settings.emailNotificationsDescription')}
+ {$_('user.settings.emailNotificationsDescription')}
</p>
</div>
@@ -117,7 +123,9 @@
</div>
{:else if setting === 'pos'}
<div>
- <label for="currency" class="font-bold block mb-1">{$_('user.settings.localCurrency')}</label>
+ <label for="currency" class="font-bold block mb-1"
+ >{$_('user.settings.localCurrency')}</label
+ >
<select name="currency" class="block py-3 w-full">
<option value="USD">USD</option>
</select>
diff --git a/src/routes/[username]/support/+page.svelte b/src/routes/[username]/support/+page.svelte
index bb1392b3..6bbb5fb2 100644
--- a/src/routes/[username]/support/+page.svelte
+++ b/src/routes/[username]/support/+page.svelte
@@ -2,7 +2,7 @@
// this needs to be hooked up to the backend
import { AppHeader } from '$comp';
import { user } from '$lib/store';
- import { _ } from 'svelte-i18n';
+ import { _ } from 'svelte-i18n';
let email;
let message;
</script>
@@ -11,7 +11,9 @@
<AppHeader />
<div class="my-20">
- <h1 class="text-center text-3xl md:text-4xl font-semibold mb-10">{$_('user.support.header')}</h1>
+ <h1 class="text-center text-3xl md:text-4xl font-semibold mb-10">
+ {$_('user.support.header')}
+ </h1>
<form class="space-y-5 mx-auto w-11/12 md:w-[350px]">
<div>
diff --git a/src/routes/[username]/transactions/+page.svelte b/src/routes/[username]/transactions/+page.svelte
index de93997d..1cc2611a 100644
--- a/src/routes/[username]/transactions/+page.svelte
+++ b/src/routes/[username]/transactions/+page.svelte
@@ -1,7 +1,7 @@
<script>
import { AppHeader } from '$comp';
import { user, newPayment } from '$lib/store';
- import { _ } from 'svelte-i18n';
+ import { _ } from 'svelte-i18n';
$newPayment = false;
@@ -44,7 +44,9 @@
</div>
<div class="text-center">
- <span class="text-secondary">{$_('user.transactions.' + (tx.amount < 0 ? 'sent' : 'received'))}</span>
+ <span class="text-secondary"
+ >{$_('user.transactions.' + (tx.amount < 0 ? 'sent' : 'received'))}</span
+ >
</div>
<div class="text-secondary text-right">
diff --git a/src/routes/invoice/[id]/+page.svelte b/src/routes/invoice/[id]/+page.svelte
index 6c79b693..47f405a2 100644
--- a/src/routes/invoice/[id]/+page.svelte
+++ b/src/routes/invoice/[id]/+page.svelte
@@ -6,10 +6,10 @@
import { goto } from '$app/navigation';
import { onMount } from 'svelte';
import { copy } from '$lib/utils';
- import { _, number } from 'svelte-i18n';
+ import { _, number } from 'svelte-i18n';
- export let data;
- $: ({ amount, id, rate, status, text, username } = data);
+ export let data;
+ $: ({ amount, id, rate, status, text, username } = data);
$invoices[id] = { amount, id, rate, status, text, username };
@@ -245,7 +245,8 @@
stroke-linecap="round"
stroke-linejoin="round"
/>
- </svg> {$_('invoice.addTip')}
+ </svg>
+ {$_('invoice.addTip')}
</button>
<span class="text-secondary block"
diff --git a/src/routes/jobs/+page.svelte b/src/routes/jobs/+page.svelte
index 724c5b91..db637b39 100644
--- a/src/routes/jobs/+page.svelte
+++ b/src/routes/jobs/+page.svelte
@@ -1,7 +1,7 @@
<script>
import { Icon } from '$comp';
import { goto } from '$app/navigation';
- import { _ } from 'svelte-i18n';
+ import { _ } from 'svelte-i18n';
</script>
<a href="/">
@@ -16,9 +16,9 @@
<h2 class="text-2xl font-medium">{$_('jobs.subheader')}</h2>
<p class="text-justify text-xl text-secondary">
- {$_('jobs.pitch1')}
+ {$_('jobs.pitch1')}
<br /><br />
- {$_('jobs.pitch2')}
+ {$_('jobs.pitch2')}
<a
href="https://github.com/coinos"
target="_blank"
@@ -26,7 +26,7 @@
class="underline underline-offset-4">{$_('jobs.github')}</a
>.
<br /><br />
- {$_('jobs.pitch3')}
+ {$_('jobs.pitch3')}
<a href="mailto:[email protected]" class="underline underline-offset-4">[email protected]</a>.
</p>
</div>
diff --git a/src/routes/login/+page.server.js b/src/routes/login/+page.server.js
index b788af07..e2018ba4 100644
--- a/src/routes/login/+page.server.js
+++ b/src/routes/login/+page.server.js
@@ -2,7 +2,7 @@ import { login, post } from '$lib/utils';
export async function POST({ setHeaders, request }) {
let user = Object.fromEntries(await request.formData());
- await login(user, setHeaders);
+ await login(user, setHeaders);
return { location: `/${data.username}/dashboard` };
}
diff --git a/src/routes/register/+page.server.js b/src/routes/register/+page.server.js
index dc7dda33..0c7efafd 100644
--- a/src/routes/register/+page.server.js
+++ b/src/routes/register/+page.server.js
@@ -6,7 +6,7 @@ let maxAge = 30 * 24 * 60 * 60;
export async function POST({ request, setHeaders }) {
let user = Object.fromEntries(await request.formData());
await post('/register', { user });
- await login(user, setHeaders);
-
+ await login(user, setHeaders);
+
return { location: `/${user.username}/dashboard` };
}