aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-12-14 12:28:24 -0800
committerAdam Soltys <[email protected]>2022-12-14 12:28:24 -0800
commitcf264a3649a9244c7bac8fbd353d6b07852f38ee (patch)
tree8ee6a8927855ff503c38eadebd7cf169bd46962e
parent9aa8f1798e56251afdf8b7a3b0d8c63f59eb31df (diff)
downloadcoinos-ui-cf264a3649a9244c7bac8fbd353d6b07852f38ee.tar.gz
coinos-ui-cf264a3649a9244c7bac8fbd353d6b07852f38ee.zip
prettier
-rw-r--r--src/components/Footer.svelte11
-rw-r--r--src/lib/socket.js1
-rw-r--r--src/locales/de.json32
-rw-r--r--src/locales/en.json32
-rw-r--r--src/locales/es.json32
-rw-r--r--src/locales/pt.json32
-rw-r--r--src/routes/(app)/[username]/+page.svelte12
-rw-r--r--src/routes/(app)/[username]/dashboard/+page.svelte2
-rw-r--r--src/routes/(app)/[username]/receive/[...param]/+page.svelte2
-rw-r--r--src/routes/(app)/[username]/request/+page.svelte8
-rw-r--r--src/routes/(app)/[username]/transactions/[...page]/+page.svelte9
-rw-r--r--src/routes/(app)/invoice/[id]/+page.svelte2
-rw-r--r--src/routes/(app)/ln/[lnurl]/+page.server.js1
-rw-r--r--src/routes/(app)/send/[...text]/+page.svelte2
-rw-r--r--src/routes/(app)/send/[uuid=uuid]/+page.svelte4
15 files changed, 94 insertions, 88 deletions
diff --git a/src/components/Footer.svelte b/src/components/Footer.svelte
index 82848c47..82282465 100644
--- a/src/components/Footer.svelte
+++ b/src/components/Footer.svelte
@@ -31,13 +31,14 @@
</a>
</div>
</div>
- <div class="w-full flex">
- <div class="mx-auto">
- <LocaleSelector style="p-2 text-center hover:opacity-80 cursor-pointer border rounded-full" />
+ <div class="w-full flex">
+ <div class="mx-auto">
+ <LocaleSelector
+ style="p-2 text-center hover:opacity-80 cursor-pointer border rounded-full"
+ />
+ </div>
</div>
</div>
- </div>
-
<div class="text-center md:text-left">
<p class="font-semibold">{$t('footer.followUs')}</p>
diff --git a/src/lib/socket.js b/src/lib/socket.js
index 24d85833..95b4a512 100644
--- a/src/lib/socket.js
+++ b/src/lib/socket.js
@@ -64,7 +64,6 @@ export function connect(t) {
if (socket) return auth();
- console.log("SOCK", PUBLIC_SOCKET)
socket = new WebSocket(PUBLIC_SOCKET);
socket.addEventListener('open', onWebsocketOpen);
socket.addEventListener('close', onWebsocketClose);
diff --git a/src/locales/de.json b/src/locales/de.json
index 40439d32..58627b15 100644
--- a/src/locales/de.json
+++ b/src/locales/de.json
@@ -162,15 +162,15 @@
"user": {
"bitcoin": "Bitcoin",
"lightning": "Lightning",
- "invoice": "Rechnung",
+ "invoice": "Rechnung",
"unfollow": "Nicht mehr folgen",
"following": "Folgen",
"follow": "Folgen",
"remove": "Entfernen",
"scanToPayBTC": "Den QR-Code scannen um mit Bitcoin zu zahlen",
- "this": "Das",
- "lightningAddress": "Lightning Adresse",
- "likeAnEmail": "ist wie eine E-Mail Adresse für Bitcoin. Sie können diese auf Ihrer Website oder auf Ihren Visitenkarten veröffentlichen und mehrfach verwenden.",
+ "this": "Das",
+ "lightningAddress": "Lightning Adresse",
+ "likeAnEmail": "ist wie eine E-Mail Adresse für Bitcoin. Sie können diese auf Ihrer Website oder auf Ihren Visitenkarten veröffentlichen und mehrfach verwenden.",
"dashboard": {
"go": "Los",
"dashboard": "Übersicht",
@@ -261,17 +261,17 @@
"sentInvoiceTo": "Rechnung senden an",
"sentRequestTo": "Anfrage senden an",
"pleasePay": "Bitte bezahlen Sie",
- "day": "Tag",
- "week": "Woche",
- "month": "Monat",
- "all": "Alles",
- "export": "Exportieren",
- "invoice": "Rechnung",
- "readyToPay": "Steht zur Zahlung bereit",
- "describeOrder": "Benutzen Sie dieses Feld um Ihre Bestellung zu beschreiben",
- "requestAnInvoice": "Rechnung anfordern",
- "submit": "Übermitteln",
- "isRequesting": "Anfragen",
- "awaiting": "Warten auf"
+ "day": "Tag",
+ "week": "Woche",
+ "month": "Monat",
+ "all": "Alles",
+ "export": "Exportieren",
+ "invoice": "Rechnung",
+ "readyToPay": "Steht zur Zahlung bereit",
+ "describeOrder": "Benutzen Sie dieses Feld um Ihre Bestellung zu beschreiben",
+ "requestAnInvoice": "Rechnung anfordern",
+ "submit": "Übermitteln",
+ "isRequesting": "Anfragen",
+ "awaiting": "Warten auf"
}
}
diff --git a/src/locales/en.json b/src/locales/en.json
index 49f65ee1..08256803 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -162,15 +162,15 @@
"user": {
"bitcoin": "Bitcoin",
"lightning": "Lightning",
- "invoice": "Invoice",
+ "invoice": "Invoice",
"unfollow": "Unfollow",
"following": "Following",
"follow": "Follow",
"remove": "Remove",
"scanToPayBTC": "Scan to pay with bitcoin",
- "this": "This",
- "lightningAddress": "lightning address",
- "likeAnEmail": "is like an email for bitcoin. You can publish it on your website or business cards and use it multiple times.",
+ "this": "This",
+ "lightningAddress": "lightning address",
+ "likeAnEmail": "is like an email for bitcoin. You can publish it on your website or business cards and use it multiple times.",
"dashboard": {
"go": "Go",
"dashboard": "Dashboard",
@@ -261,17 +261,17 @@
"sentInvoiceTo": "Sent invoice to",
"sentRequestTo": "Sent request to",
"pleasePay": "Please pay",
- "day": "Day",
- "week": "Week",
- "month": "Month",
- "all": "All",
- "export": "Export",
- "invoice": "Invoice",
- "readyToPay": "is ready to pay",
- "describeOrder": "Use this field to describe your order",
- "requestAnInvoice": "Request an invoice",
- "submit": "Submit",
- "isRequesting": "is requesting",
- "awaiting": "Awaiting"
+ "day": "Day",
+ "week": "Week",
+ "month": "Month",
+ "all": "All",
+ "export": "Export",
+ "invoice": "Invoice",
+ "readyToPay": "is ready to pay",
+ "describeOrder": "Use this field to describe your order",
+ "requestAnInvoice": "Request an invoice",
+ "submit": "Submit",
+ "isRequesting": "is requesting",
+ "awaiting": "Awaiting"
}
}
diff --git a/src/locales/es.json b/src/locales/es.json
index d72d5d92..292569fe 100644
--- a/src/locales/es.json
+++ b/src/locales/es.json
@@ -144,7 +144,7 @@
"failed": "Inicio de sesión fallido"
},
"nav": {
- "profile": "Perfil",
+ "profile": "Perfil",
"startInSeconds": "Comience de inmediato",
"account": "Cuenta",
"signIn": "Iniciar sesión",
@@ -167,9 +167,9 @@
"follow": "Seguir",
"remove": "Eliminar",
"scanToPayBTC": "Escanea para pagar en bitcoin",
- "this": "Esta",
- "lightningAddress": "dirección relámpago",
- "likeAnEmail": "es como un correo electrónico para bitcoin. Puede publicarlo en su sitio web o tarjetas de presentación y usarlo varias veces.",
+ "this": "Esta",
+ "lightningAddress": "dirección relámpago",
+ "likeAnEmail": "es como un correo electrónico para bitcoin. Puede publicarlo en su sitio web o tarjetas de presentación y usarlo varias veces.",
"dashboard": {
"dashboard": "Tablero",
"accountBalance": "Saldo",
@@ -259,17 +259,17 @@
"sentInvoiceTo": "Factura enviada a",
"sentRequestTo": "Solicitud enviada a",
"pleasePay": "Por favor pague",
- "day": "Dia",
- "week": "Semana",
- "month": "Mes",
- "all": "Todo",
- "export": "Exportar",
- "invoice": "Factura",
- "readyToPay": "está listo para pagar",
- "describeOrder": "Utilice este campo para describir su pedido",
- "requestAnInvoice": "Solicitar una factura",
- "submit": "Enviar",
- "isRequesting": "está solicitando",
- "awaiting": "Esperando"
+ "day": "Dia",
+ "week": "Semana",
+ "month": "Mes",
+ "all": "Todo",
+ "export": "Exportar",
+ "invoice": "Factura",
+ "readyToPay": "está listo para pagar",
+ "describeOrder": "Utilice este campo para describir su pedido",
+ "requestAnInvoice": "Solicitar una factura",
+ "submit": "Enviar",
+ "isRequesting": "está solicitando",
+ "awaiting": "Esperando"
}
}
diff --git a/src/locales/pt.json b/src/locales/pt.json
index 49f65ee1..08256803 100644
--- a/src/locales/pt.json
+++ b/src/locales/pt.json
@@ -162,15 +162,15 @@
"user": {
"bitcoin": "Bitcoin",
"lightning": "Lightning",
- "invoice": "Invoice",
+ "invoice": "Invoice",
"unfollow": "Unfollow",
"following": "Following",
"follow": "Follow",
"remove": "Remove",
"scanToPayBTC": "Scan to pay with bitcoin",
- "this": "This",
- "lightningAddress": "lightning address",
- "likeAnEmail": "is like an email for bitcoin. You can publish it on your website or business cards and use it multiple times.",
+ "this": "This",
+ "lightningAddress": "lightning address",
+ "likeAnEmail": "is like an email for bitcoin. You can publish it on your website or business cards and use it multiple times.",
"dashboard": {
"go": "Go",
"dashboard": "Dashboard",
@@ -261,17 +261,17 @@
"sentInvoiceTo": "Sent invoice to",
"sentRequestTo": "Sent request to",
"pleasePay": "Please pay",
- "day": "Day",
- "week": "Week",
- "month": "Month",
- "all": "All",
- "export": "Export",
- "invoice": "Invoice",
- "readyToPay": "is ready to pay",
- "describeOrder": "Use this field to describe your order",
- "requestAnInvoice": "Request an invoice",
- "submit": "Submit",
- "isRequesting": "is requesting",
- "awaiting": "Awaiting"
+ "day": "Day",
+ "week": "Week",
+ "month": "Month",
+ "all": "All",
+ "export": "Export",
+ "invoice": "Invoice",
+ "readyToPay": "is ready to pay",
+ "describeOrder": "Use this field to describe your order",
+ "requestAnInvoice": "Request an invoice",
+ "submit": "Submit",
+ "isRequesting": "is requesting",
+ "awaiting": "Awaiting"
}
}
diff --git a/src/routes/(app)/[username]/+page.svelte b/src/routes/(app)/[username]/+page.svelte
index 932ec777..8795c916 100644
--- a/src/routes/(app)/[username]/+page.svelte
+++ b/src/routes/(app)/[username]/+page.svelte
@@ -71,13 +71,11 @@
{#if user?.username === subject.username}
<p class="text-secondary mb-1">
- {$t("user.this")} <a
- href="https://lightningaddress.com"
- class="underline"
- target="_blank"
- rel="noreferrer">{$t("user.lightningAddress")}</a
- > {$t("user.likeAnEmail")}
-
+ {$t('user.this')}
+ <a href="https://lightningaddress.com" class="underline" target="_blank" rel="noreferrer"
+ >{$t('user.lightningAddress')}</a
+ >
+ {$t('user.likeAnEmail')}
</p>
{/if}
</div>
diff --git a/src/routes/(app)/[username]/dashboard/+page.svelte b/src/routes/(app)/[username]/dashboard/+page.svelte
index 112162ad..1c8fdb1b 100644
--- a/src/routes/(app)/[username]/dashboard/+page.svelte
+++ b/src/routes/(app)/[username]/dashboard/+page.svelte
@@ -110,7 +110,7 @@
<div class="flex">
<Avatar user={requester} size={20} />
<div class="my-auto text-left">
- <p class="text-secondary">{$t("transactions.awaiting")}</p>
+ <p class="text-secondary">{$t('transactions.awaiting')}</p>
<p class="ml-1 text-lg break-words">{requester.username}</p>
</div>
</div>
diff --git a/src/routes/(app)/[username]/receive/[...param]/+page.svelte b/src/routes/(app)/[username]/receive/[...param]/+page.svelte
index 9e9f4f66..71bed53e 100644
--- a/src/routes/(app)/[username]/receive/[...param]/+page.svelte
+++ b/src/routes/(app)/[username]/receive/[...param]/+page.svelte
@@ -43,7 +43,7 @@
class="bg-black text-white rounded-xl w-full h-[48px] flex justify-center items-center font-semibold
opacity-100 hover:opacity-80"
>
- {amount ? $t("transactions.next") : $t("transactions.sendersChoice")}
+ {amount ? $t('transactions.next') : $t('transactions.sendersChoice')}
</button>
</div>
</form>
diff --git a/src/routes/(app)/[username]/request/+page.svelte b/src/routes/(app)/[username]/request/+page.svelte
index bbbb514c..fb3d0599 100644
--- a/src/routes/(app)/[username]/request/+page.svelte
+++ b/src/routes/(app)/[username]/request/+page.svelte
@@ -15,7 +15,9 @@
</button>
<div class="container max-w-lg px-4 mx-auto mt-10 space-y-5">
- <h1 class="px-3 md:px-0 text-center text-3xl md:text-4xl font-semibold">{$t("transactions.requestAnInvoice")}</h1>
+ <h1 class="px-3 md:px-0 text-center text-3xl md:text-4xl font-semibold">
+ {$t('transactions.requestAnInvoice')}
+ </h1>
<form action="?/create" method="POST" use:enhance class="space-y-5">
<input type="hidden" name="requester_id" value={user.id} />
@@ -23,7 +25,7 @@
<textarea
name="memo"
- placeholder={$t("transactions.describeOrder")}
+ placeholder={$t('transactions.describeOrder')}
class="w-full p-4 border rounded-xl h-48"
/>
@@ -32,7 +34,7 @@
type="submit"
class="bg-black text-white border rounded-full px-6 py-2 font-bold mx-auto"
>
- {$t("transactions.submit")}
+ {$t('transactions.submit')}
</button>
</div>
</form>
diff --git a/src/routes/(app)/[username]/transactions/[...page]/+page.svelte b/src/routes/(app)/[username]/transactions/[...page]/+page.svelte
index 48e710fe..b71a2a96 100644
--- a/src/routes/(app)/[username]/transactions/[...page]/+page.svelte
+++ b/src/routes/(app)/[username]/transactions/[...page]/+page.svelte
@@ -77,7 +77,9 @@
class:active={selection === i}
href={`/${user.username}/transactions/${getUnixTime(start) + '/'}1`}
>
- <button class="text-sm md:text-lg rounded-full border py-2 px-4 hover:opacity-80 min-w-[72px]">
+ <button
+ class="text-sm md:text-lg rounded-full border py-2 px-4 hover:opacity-80 min-w-[72px]"
+ >
<div class="my-auto">{title}</div>
</button>
</a>
@@ -162,7 +164,10 @@
<p class="text-secondary text-lg text-center">{$t('transactions.empty')}</p>
{/each}
</div>
- <button class="ml-auto rounded-full border py-2 px-4 w-36 hover:opacity-80 flex mx-auto" on:click={csv}>
+ <button
+ class="ml-auto rounded-full border py-2 px-4 w-36 hover:opacity-80 flex mx-auto"
+ on:click={csv}
+ >
<Icon icon="save" style="opacity-50 mr-2 my-auto" />
<div class="my-auto">{$t('transactions.export')}</div>
</button>
diff --git a/src/routes/(app)/invoice/[id]/+page.svelte b/src/routes/(app)/invoice/[id]/+page.svelte
index c2c28a6c..222cbb53 100644
--- a/src/routes/(app)/invoice/[id]/+page.svelte
+++ b/src/routes/(app)/invoice/[id]/+page.svelte
@@ -79,7 +79,7 @@
<div class="container mx-auto max-w-lg px-4 space-y-2 sm:space-y-5">
<div>
- <h1 class="text-secondary text-center text-xl">{$t("transactions.pleasePay")}</h1>
+ <h1 class="text-secondary text-center text-xl">{$t('transactions.pleasePay')}</h1>
<div class="flex w-full">
<div class="mx-auto">
diff --git a/src/routes/(app)/ln/[lnurl]/+page.server.js b/src/routes/(app)/ln/[lnurl]/+page.server.js
index eb31a058..a8079707 100644
--- a/src/routes/(app)/ln/[lnurl]/+page.server.js
+++ b/src/routes/(app)/ln/[lnurl]/+page.server.js
@@ -19,5 +19,6 @@ export const actions = {
let { callback, ...form } = Object.fromEntries(await request.formData());
form.params = { callback };
await post('/pay', form, auth(cookies));
+ throw redirect(307, '/sent');
}
};
diff --git a/src/routes/(app)/send/[...text]/+page.svelte b/src/routes/(app)/send/[...text]/+page.svelte
index 657d15ae..cb37d669 100644
--- a/src/routes/(app)/send/[...text]/+page.svelte
+++ b/src/routes/(app)/send/[...text]/+page.svelte
@@ -95,7 +95,7 @@
<div class="flex">
<div>
<div class="flex">
- <Avatar user={c} size={20} disabled={true} />
+ <Avatar user={c} size={20} disabled={true} />
<div class="my-auto text-left">
<p class="ml-1 text-lg break-words">{c.username}</p>
<p class="ml-1 text-secondary">
diff --git a/src/routes/(app)/send/[uuid=uuid]/+page.svelte b/src/routes/(app)/send/[uuid=uuid]/+page.svelte
index 23e8a73e..40636f35 100644
--- a/src/routes/(app)/send/[uuid=uuid]/+page.svelte
+++ b/src/routes/(app)/send/[uuid=uuid]/+page.svelte
@@ -53,7 +53,7 @@
{fiat ? f(amountFiat, currency) : '⚡️' + s(amount)}
</p>
- <h1 class="text-xl md:text-2xl text-secondary mb-2">{$t("transactions.to")}</h1>
+ <h1 class="text-xl md:text-2xl text-secondary mb-2">{$t('transactions.to')}</h1>
<div class="flex p-1 gap-2 justify-center">
<Avatar user={recipient} size={'20'} />
@@ -90,7 +90,7 @@
class="opacity-100 hover:opacity-80'} rounded-2xl border py-3 font-bold mx-auto mt-2 bg-black text-white px-4 w-24"
on:click={setAmount}
>
- {$t("transactions.next")}
+ {$t('transactions.next')}
</button>
{/if}
</div>