aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(static)
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/(static)')
-rw-r--r--src/routes/(static)/+layout.svelte5
-rw-r--r--src/routes/(static)/bounties/+page.svelte49
-rw-r--r--src/routes/(static)/docs/+page.svelte67
-rw-r--r--src/routes/(static)/forgot/+page.svelte4
-rw-r--r--src/routes/(static)/login/+page.svelte41
-rw-r--r--src/routes/(static)/privacy/+page.svelte13
-rw-r--r--src/routes/(static)/register/+page.svelte69
-rw-r--r--src/routes/(static)/removal/+page.svelte4
-rw-r--r--src/routes/(static)/support/+page.svelte26
9 files changed, 76 insertions, 202 deletions
diff --git a/src/routes/(static)/+layout.svelte b/src/routes/(static)/+layout.svelte
index a6f6d858..9c7f5e5e 100644
--- a/src/routes/(static)/+layout.svelte
+++ b/src/routes/(static)/+layout.svelte
@@ -16,10 +16,7 @@
<SvelteToast options={{ reversed: true, intro: { y: 192 } }} />
<LandingHeader {user} />
<Nostr />
-<main
- class="container flex px-4 md:px-40 mx-auto min-h-[600px]"
- data-theme={theme}
->
+<main class="container flex px-4 md:px-40 mx-auto min-h-[600px]" data-theme={theme}>
{@render children?.()}
</main>
<Footer />
diff --git a/src/routes/(static)/bounties/+page.svelte b/src/routes/(static)/bounties/+page.svelte
index 3cc269dc..fad8c041 100644
--- a/src/routes/(static)/bounties/+page.svelte
+++ b/src/routes/(static)/bounties/+page.svelte
@@ -41,10 +41,7 @@
<div class="flex max-w-xs sm:max-w-xl">
<div>First {b}</div>
- <iconify-icon
- noobserver
- icon="ph:lightning-fill"
- class="text-yellow-300 ml-auto"
+ <iconify-icon noobserver icon="ph:lightning-fill" class="text-yellow-300 ml-auto"
></iconify-icon>{s(100000, "en-CA")}
</div>
{/each}
@@ -57,10 +54,7 @@
<div class="flex max-w-xs sm:max-w-xl">
<div>{b.type}</div>
- <iconify-icon
- noobserver
- icon="ph:lightning-fill"
- class="text-yellow-300 ml-auto"
+ <iconify-icon noobserver icon="ph:lightning-fill" class="text-yellow-300 ml-auto"
></iconify-icon>{s(b.amount, "en-CA")}
</div>
{/each}
@@ -85,9 +79,7 @@
class="whitespace-wrap text-base font-semibold max-w-[150px] truncate sm:max-w-full"
title={merchant.display || merchant.username}
>
- <a href={`/${merchant.username}`}
- >{merchant.display || merchant.username}</a
- >
+ <a href={`/${merchant.username}`}>{merchant.display || merchant.username}</a>
</h3>
<span
@@ -102,17 +94,12 @@
class="mt-2 flex items-center gap-2 text-sm text-neutral-600 dark:text-neutral-300 min-w-0"
>
<Avatar {user} size={8} class="shrink-0" />
- <span class="truncate max-w-full"
- >Referred by @{user.username}</span
- >
+ <span class="truncate max-w-full">Referred by @{user.username}</span>
</div>
</div>
<div class="ml-auto flex shrink-0 items-center gap-1 whitespace">
- <iconify-icon
- noobserver
- icon="ph:lightning-fill"
- class="text-yellow-300"
+ <iconify-icon noobserver icon="ph:lightning-fill" class="text-yellow-300"
></iconify-icon>
<span class="text-sm font-semibold tabular-nums">
{s(amount, "en-CA")}
@@ -145,38 +132,32 @@
</ul>
<p>
- 25% of the bounty will be awarded once the business is ready to take
- payments and has been announced
+ 25% of the bounty will be awarded once the business is ready to take payments and has been
+ announced
</p>
- <p>
- The rest will be awarded once they've been accepting Bitcoin for 6 months
- </p>
+ <p>The rest will be awarded once they've been accepting Bitcoin for 6 months</p>
<p>Bounties will be awarded at our discretion</p>
- <p>
- We reserve the right to refuse applicants and change these terms without
- cause or notice
- </p>
+ <p>We reserve the right to refuse applicants and change these terms without cause or notice</p>
<h2 class="text-2xl font-bold">Get Started!</h2>
<p>
- Reach out to <a
- href="mailto:[email protected]"
- class="text-blue-600 hover:underline">[email protected]</a
+ Reach out to <a href="mailto:[email protected]" class="text-blue-600 hover:underline"
> and let us know who we should contact
</p>
<p>
- We'll update this page as the bounties are claimed so you'll be able to see
- which ones are still available.
+ We'll update this page as the bounties are claimed so you'll be able to see which ones are still
+ available.
</p>
<p>
- Have a lead or idea for something that's not on the list? Reach out! We
- offer sats for all sorts of referrals!
+ Have a lead or idea for something that's not on the list? Reach out! We offer sats for all sorts
+ of referrals!
</p>
<p>Thanks for participating and helping to orange pill Vancouver!</p>
diff --git a/src/routes/(static)/docs/+page.svelte b/src/routes/(static)/docs/+page.svelte
index 51b1f54e..fc803158 100644
--- a/src/routes/(static)/docs/+page.svelte
+++ b/src/routes/(static)/docs/+page.svelte
@@ -11,20 +11,13 @@
? `${PUBLIC_COINOS_URL}`
: `https://${PUBLIC_DOMAIN}/api`;
- let tokenSample = token
- ? `export token="${token}"`
- : `export token=<your auth token>`;
+ let tokenSample = token ? `export token="${token}"` : `export token=<your auth token>`;
let roSample = `export token="${ro}"`;
</script>
{#snippet cp(something)}
- <button
- type="button"
- class="ml-auto"
- onclick={() => copy(something)}
- aria-label="Copy value"
- >
+ <button type="button" class="ml-auto" onclick={() => copy(something)} aria-label="Copy value">
<iconify-icon noobserver icon="ph:copy-bold" width="42"></iconify-icon>
</button>
{/snippet}
@@ -40,17 +33,15 @@
</p>
<p class="text-secondary">
- Coinos has a REST API that can be used to register accounts and make
- payments. The following examples show how you can call the API with <a
+ Coinos has a REST API that can be used to register accounts and make payments. The following
+ examples show how you can call the API with <a
href="https://curl.se/"
class="text-secondary underline">curl</a
>
</p>
<h2 class="text-2xl">API Base URL</h2>
- <div
- class="bg-primary text-primary-content rounded-lg p-4 flex gap-4 items-center"
- >
+ <div class="bg-primary text-primary-content rounded-lg p-4 flex gap-4 items-center">
<div>{api}</div>
{@render cp(api)}
</div>
@@ -60,38 +51,32 @@
{#if user && token}
This token authorizes you to use the API as <b>{user.username}</b>.
{:else}
- <a href="/login" class="font-bold">Sign in</a> to view your auth token here,
- or get one from the /login endpoint.
+ <a href="/login" class="font-bold">Sign in</a> to view your auth token here, or get one from the
+ /login endpoint.
{/if}
- Save it in a variable called <b>$token</b> to run the examples. It gives full
- access to your account so keep it safe.
+ Save it in a variable called <b>$token</b> to run the examples. It gives full access to your account
+ so keep it safe.
</p>
- <div
- class="bg-primary text-primary-content rounded-lg p-4 flex gap-4 items-center"
- >
+ <div class="bg-primary text-primary-content rounded-lg p-4 flex gap-4 items-center">
<div class="w-full break-all">{tokenSample}</div>
{@render cp(tokenSample)}
</div>
{#if ro}
<p class="text-secondary">
- This read-only token has permission to create invoices and fetch payments
- but can't be used to make withdrawals
+ This read-only token has permission to create invoices and fetch payments but can't be used to
+ make withdrawals
</p>
- <div
- class="bg-primary text-primary-content rounded-lg p-4 flex gap-4 items-center"
- >
+ <div class="bg-primary text-primary-content rounded-lg p-4 flex gap-4 items-center">
<div class="w-full break-all">{roSample}</div>
{@render cp(roSample)}
</div>
{/if}
<h2 class="text-2xl">POST /register</h2>
- <p class="text-secondary">
- Register a new user account with a username and password
- </p>
+ <p class="text-secondary">Register a new user account with a username and password</p>
<Code sample="register" />
<h2 class="text-2xl">POST /login</h2>
@@ -111,13 +96,9 @@
<div class="font-bold">display</div>
<div class="col-span-2">string - spaces allowed</div>
<div class="font-bold">currency</div>
- <div class="col-span-2">
- string - three-letter ISO currency code e.g. CAD or USD
- </div>
+ <div class="col-span-2">string - three-letter ISO currency code e.g. CAD or USD</div>
<div class="font-bold">language</div>
- <div class="col-span-2">
- string - two-letter language code e.g. en, fr, es
- </div>
+ <div class="col-span-2">string - two-letter language code e.g. en, fr, es</div>
</div>
<Code sample="update" />
@@ -131,19 +112,13 @@
<div class="font-bold">type (string, default: lightning)</div>
<div class="col-span-2">bitcoin or lightning</div>
<div class="font-bold">fiat (boolean, default: false)</div>
- <div class="col-span-2">
- whether the amount is denominated in satoshis or local currency
- </div>
+ <div class="col-span-2">whether the amount is denominated in satoshis or local currency</div>
<div class="font-bold">amount (numeric)</div>
<div class="col-span-2">amount to be paid</div>
<div class="font-bold">webhook (string, optional)</div>
- <div class="col-span-2">
- remote endpoint to call when the invoice is paid
- </div>
+ <div class="col-span-2">remote endpoint to call when the invoice is paid</div>
<div class="font-bold">secret (string, optional)</div>
- <div class="col-span-2">
- a secret value passed to the webhook to authenticate the request
- </div>
+ <div class="col-span-2">a secret value passed to the webhook to authenticate the request</div>
</div>
</div>
@@ -178,9 +153,7 @@
<Code sample="bitcoin" />
<h2 class="text-2xl">GET /payments</h2>
- <p class="text-secondary">
- Get all payments sent or received by the current user
- </p>
+ <p class="text-secondary">Get all payments sent or received by the current user</p>
<div class="text-secondary">
<div>Query params</div>
diff --git a/src/routes/(static)/forgot/+page.svelte b/src/routes/(static)/forgot/+page.svelte
index 711c5568..82ea75a3 100644
--- a/src/routes/(static)/forgot/+page.svelte
+++ b/src/routes/(static)/forgot/+page.svelte
@@ -8,9 +8,7 @@
let loading;
</script>
-<div
- class="mx-auto md:shadow-xl rounded-3xl max-w-xl w-full md:w-[480px] md:p-8 mb-20 space-y-5"
->
+<div class="mx-auto md:shadow-xl rounded-3xl max-w-xl w-full md:w-[480px] md:p-8 mb-20 space-y-5">
<h1 class="text-2xl font-bold text-center">{$t("login.reset")}</h1>
<div class="text-secondary">
diff --git a/src/routes/(static)/login/+page.svelte b/src/routes/(static)/login/+page.svelte
index 08694cd8..7c9c29fc 100644
--- a/src/routes/(static)/login/+page.svelte
+++ b/src/routes/(static)/login/+page.svelte
@@ -45,8 +45,7 @@
onMount(() => {
if (!isTor && recaptchaSiteKey) {
let s = document.createElement("script");
- s.src =
- "https://www.google.com/recaptcha/api.js?render=" + recaptchaSiteKey;
+ s.src = "https://www.google.com/recaptcha/api.js?render=" + recaptchaSiteKey;
document.head.appendChild(s);
}
});
@@ -72,13 +71,9 @@
const getRecaptchaToken = () =>
new Promise((resolve, reject) => {
if (isTor || !recaptchaSiteKey) return resolve("");
- if (!browser || !grecaptcha)
- return reject(new Error("captcha unavailable"));
+ if (!browser || !grecaptcha) return reject(new Error("captcha unavailable"));
grecaptcha.ready(() => {
- grecaptcha
- .execute(recaptchaSiteKey, { action: "login" })
- .then(resolve)
- .catch(reject);
+ grecaptcha.execute(recaptchaSiteKey, { action: "login" }).then(resolve).catch(reject);
});
});
@@ -108,9 +103,7 @@
});
});
- let redirect = $derived(
- $loginRedirect || $page.url.searchParams.get("redirect"),
- );
+ let redirect = $derived($loginRedirect || $page.url.searchParams.get("redirect"));
let nostrLogin = async () => {
let event = {
@@ -157,9 +150,7 @@
}
const scriptSelector =
- "script[src='https://www.google.com/recaptcha/api.js?render=" +
- recaptchaSiteKey +
- "']";
+ "script[src='https://www.google.com/recaptcha/api.js?render=" + recaptchaSiteKey + "']";
const script = document.querySelector(scriptSelector);
if (script) {
script.remove();
@@ -167,9 +158,7 @@
});
</script>
-<div
- class="mx-auto md:shadow-xl rounded-3xl max-w-xl w-full md:w-[480px] md:p-8 mb-20 space-y-5"
->
+<div class="mx-auto md:shadow-xl rounded-3xl max-w-xl w-full md:w-[480px] md:p-8 mb-20 space-y-5">
<h1 class="text-2xl font-bold text-center">{$t("login.signIn")}</h1>
{#if form?.error && !form?.message.includes("2fa")}
<div class="text-red-600 text-center" in:fly>
@@ -177,12 +166,7 @@
</div>
{/if}
- <form
- use:enhance={enhanceLogin}
- class="space-y-5"
- method="POST"
- action="?/login"
- >
+ <form use:enhance={enhanceLogin} class="space-y-5" method="POST" action="?/login">
<input type="hidden" name="loginRedirect" value={redirect} />
<input type="hidden" name="token" value={token} />
@@ -205,12 +189,7 @@
>
</div>
- <button
- type="submit"
- class="btn btn-accent"
- bind:this={btn}
- data-testid="login-submit"
- >
+ <button type="submit" class="btn btn-accent" bind:this={btn} data-testid="login-submit">
{$t("login.signIn")}
</button>
@@ -246,9 +225,7 @@
aria-labelledby="title"
tabindex="-1"
>
- <div
- class="mx-auto p-5 border shadow-lg rounded-md bg-base-100 space-y-5 max-w-lg"
- >
+ <div class="mx-auto p-5 border shadow-lg rounded-md bg-base-100 space-y-5 max-w-lg">
<h1 id="title" class="text-center text-2xl font-semibold">2FA</h1>
<Pinpad bind:v={token} {cancel} />
diff --git a/src/routes/(static)/privacy/+page.svelte b/src/routes/(static)/privacy/+page.svelte
index 7b21a5be..ccbe8a92 100644
--- a/src/routes/(static)/privacy/+page.svelte
+++ b/src/routes/(static)/privacy/+page.svelte
@@ -2,15 +2,14 @@
<div class="text-2xl font-bold">Privacy Policy</div>
<div>
- The only personal information we require to create an account is a username
- and password. Some users may provide an email address for notification or
- password reset purposes. We will not share your email with anyone or use it
- for anything other than the purposes stated.
+ The only personal information we require to create an account is a username and password. Some
+ users may provide an email address for notification or password reset purposes. We will not
+ share your email with anyone or use it for anything other than the purposes stated.
</div>
<div>
- We keep records of payment history associated to accounts and may be
- obligated to share our records with financial authorities. You may request
- that your account be deleted by visiting https://coinos.io/removal
+ We keep records of payment history associated to accounts and may be obligated to share our
+ records with financial authorities. You may request that your account be deleted by visiting
+ https://coinos.io/removal
</div>
</div>
diff --git a/src/routes/(static)/register/+page.svelte b/src/routes/(static)/register/+page.svelte
index 0200b15b..f594244c 100644
--- a/src/routes/(static)/register/+page.svelte
+++ b/src/routes/(static)/register/+page.svelte
@@ -18,12 +18,7 @@
import { avatar, signer, password, pin, loginRedirect } from "$lib/store";
import { t } from "$lib/translations";
import { page } from "$app/stores";
- import {
- NumberDictionary,
- uniqueNamesGenerator,
- colors,
- animals,
- } from "unique-names-generator";
+ import { NumberDictionary, uniqueNamesGenerator, colors, animals } from "unique-names-generator";
import { sign } from "$lib/nostr";
let { form, data }: any = $props();
@@ -34,8 +29,7 @@
onMount(() => {
if (!isTor && recaptchaSiteKey) {
let s = document.createElement("script");
- s.src =
- "https://www.google.com/recaptcha/api.js?render=" + recaptchaSiteKey;
+ s.src = "https://www.google.com/recaptcha/api.js?render=" + recaptchaSiteKey;
document.head.appendChild(s);
}
});
@@ -109,13 +103,9 @@
const getRecaptchaToken = () =>
new Promise((resolve, reject) => {
if (isTor) return resolve("");
- if (!browser || !grecaptcha)
- return reject(new Error("captcha unavailable"));
+ if (!browser || !grecaptcha) return reject(new Error("captcha unavailable"));
grecaptcha.ready(() => {
- grecaptcha
- .execute(recaptchaSiteKey, { action: "register" })
- .then(resolve)
- .catch(reject);
+ grecaptcha.execute(recaptchaSiteKey, { action: "register" }).then(resolve).catch(reject);
});
});
@@ -260,9 +250,7 @@
}
const scriptSelector =
- "script[src='https://www.google.com/recaptcha/api.js?render=" +
- recaptchaSiteKey +
- "']";
+ "script[src='https://www.google.com/recaptcha/api.js?render=" + recaptchaSiteKey + "']";
const script = document.querySelector(scriptSelector);
if (script) {
script.remove();
@@ -274,16 +262,9 @@
<Pin bind:value={token} title="Enter 2FA Code" {cancel} notify={false} />
{/if}
-<div
- class="mx-auto md:shadow-xl rounded-3xl max-w-xl w-full md:w-[480px] md:p-8 space-y-5 mb-20"
->
+<div class="mx-auto md:shadow-xl rounded-3xl max-w-xl w-full md:w-[480px] md:p-8 space-y-5 mb-20">
<h1 class="text-2xl font-bold text-center">{$t("login.createAccount")}</h1>
- <input
- type="file"
- class="hidden!"
- bind:this={avatarInput}
- onchange={(e: any) => handleFile(e)}
- />
+ <input type="file" class="hidden!" bind:this={avatarInput} onchange={(e: any) => handleFile(e)} />
<div class="relative">
<button
@@ -291,8 +272,7 @@
onclick={decr}
aria-label="Previous"
>
- <iconify-icon noobserver icon="ph:caret-left-bold" width="32"
- ></iconify-icon>
+ <iconify-icon noobserver icon="ph:caret-left-bold" width="32"></iconify-icon>
</button>
<button class="block relative w-32 mx-auto" onclick={selectAvatar}>
<div
@@ -304,11 +284,8 @@
alt={username}
/>
</div>
- <div
- class="absolute bg-base-100 rounded-full p-2 mx-auto right-0 bottom-0 z-10 w-12"
- >
- <iconify-icon noobserver icon="ph:upload-simple-bold" width="24"
- ></iconify-icon>
+ <div class="absolute bg-base-100 rounded-full p-2 mx-auto right-0 bottom-0 z-10 w-12">
+ <iconify-icon noobserver icon="ph:upload-simple-bold" width="24"></iconify-icon>
</div>
</button>
<button
@@ -316,8 +293,7 @@
onclick={incr}
aria-label="Next"
>
- <iconify-icon noobserver icon="ph:caret-right-bold" width="32"
- ></iconify-icon>
+ <iconify-icon noobserver icon="ph:caret-right-bold" width="32"></iconify-icon>
</button>
</div>
@@ -337,10 +313,7 @@
<input type="hidden" name="token" value={token} />
<input type="hidden" name="challenge" value={challenge} />
- <label
- for="username"
- class="input flex items-center justify-center gap-2 w-full"
- >
+ <label for="username" class="input flex items-center justify-center gap-2 w-full">
<input
class="clean"
use:focus
@@ -352,15 +325,8 @@
autocapitalize="none"
placeholder={$t("login.username")}
/>
- <button
- type="button"
- tabindex="-1"
- onclick={refresh}
- aria-label="Randomize"
- class="contents"
- >
- <iconify-icon noobserver icon="ph:dice-three-bold" width="32"
- ></iconify-icon></button
+ <button type="button" tabindex="-1" onclick={refresh} aria-label="Randomize" class="contents">
+ <iconify-icon noobserver icon="ph:dice-three-bold" width="32"></iconify-icon></button
>
</label>
@@ -370,12 +336,7 @@
bind:show={revealPassword}
/>
- <button
- type="submit"
- class="btn btn-accent"
- disabled={loading}
- bind:this={btn}
- >
+ <button type="submit" class="btn btn-accent" disabled={loading} bind:this={btn}>
{#if loading}
<Spinner />
{:else}
diff --git a/src/routes/(static)/removal/+page.svelte b/src/routes/(static)/removal/+page.svelte
index 9ce4eab1..6cfc6d82 100644
--- a/src/routes/(static)/removal/+page.svelte
+++ b/src/routes/(static)/removal/+page.svelte
@@ -2,8 +2,8 @@
<div class="text-2xl font-bold">Data Removal</div>
<div>
- If you wish to delete your account and have your data removed, please add a
- verified email address to your account and send an email from it to
+ If you wish to delete your account and have your data removed, please add a verified email
+ address to your account and send an email from it to
<b>[email protected]</b> requesting that we delete your account data.
</div>
</div>
diff --git a/src/routes/(static)/support/+page.svelte b/src/routes/(static)/support/+page.svelte
index dd5439d5..8a7f55bf 100644
--- a/src/routes/(static)/support/+page.svelte
+++ b/src/routes/(static)/support/+page.svelte
@@ -23,8 +23,7 @@
onMount(() => {
if (!isTor && recaptchaSiteKey) {
let s = document.createElement("script");
- s.src =
- "https://www.google.com/recaptcha/api.js?render=" + recaptchaSiteKey;
+ s.src = "https://www.google.com/recaptcha/api.js?render=" + recaptchaSiteKey;
document.head.appendChild(s);
}
});
@@ -64,9 +63,7 @@
}
const scriptSelector =
- "script[src='https://www.google.com/recaptcha/api.js?render=" +
- recaptchaSiteKey +
- "']";
+ "script[src='https://www.google.com/recaptcha/api.js?render=" + recaptchaSiteKey + "']";
const script = document.querySelector(scriptSelector);
if (script) {
script.remove();
@@ -77,9 +74,7 @@
<div class="container max-w-lg mx-auto space-y-8 p-4 pb-20">
{#if sent}
<h1 class="text-center text-3xl lg:text-4xl font-semibold">Thank you!</h1>
- <div class="text-center text-lg text-secondary">
- Someone will be in touch shortly.
- </div>
+ <div class="text-center text-lg text-secondary">Someone will be in touch shortly.</div>
<div>
<a href={user ? `/${user.username}` : "/"}>
@@ -102,25 +97,18 @@
<form onsubmit={submit}>
<div class="mb-4">
- <label for="username" class="font-semibold"
- >{$t("user.support.accountName")}</label
- >
+ <label for="username" class="font-semibold">{$t("user.support.accountName")}</label>
<input type="text" name="username" required bind:value={username} />
</div>
<div class="mb-4">
- <label for="email" class="font-semibold"
- >{$t("user.support.email")}</label
- >
+ <label for="email" class="font-semibold">{$t("user.support.email")}</label>
<input type="email" name="email" bind:value={email} required />
</div>
<div class="mb-4">
- <label for="message" class="font-semibold"
- >{$t("user.support.message")}</label
- >
- <textarea rows={5} name="message" bind:value={message} required
- ></textarea>
+ <label for="message" class="font-semibold">{$t("user.support.message")}</label>
+ <textarea rows={5} name="message" bind:value={message} required></textarea>
</div>
<button