From 9a1cbd040ead975d51f23f9546ba8d8bf9034207 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 1 Dec 2023 15:17:58 -0800 Subject: optimizing --- bun.lockb | Bin 0 -> 110513 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100755 bun.lockb (limited to 'bun.lockb') diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 00000000..04f28ca8 Binary files /dev/null and b/bun.lockb differ -- cgit v1.2.3 From f0351d072288d603b1a469014d498aaaa5a0911c Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 1 Dec 2023 19:52:37 -0800 Subject: use bun adapter --- Dockerfile | 5 +++-- bun.lockb | Bin 110513 -> 110919 bytes package.json | 1 + svelte.config.js | 3 ++- 4 files changed, 6 insertions(+), 3 deletions(-) (limited to 'bun.lockb') diff --git a/Dockerfile b/Dockerfile index d045c896..7c5373f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,5 +7,6 @@ COPY . . RUN bun i RUN bun run build -# CMD ["node", "build"] -CMD ["bun", "run", "--bun", "preview", "--host", "--port", "3000"] +WORKDIR /home/bun/app/build + +CMD ["bun", "run", "start"] diff --git a/bun.lockb b/bun.lockb index 04f28ca8..50141b28 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index c4ce55bb..491cb75f 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ "@scure/bip39": "^1.2.1", "leaflet-tooltip-layout": "^0.1.2", "maplibre-gl": "^3.3.1", + "svelte-adapter-bun": "^0.5.1", "uint8array-extras": "^0.5.0", "unique-names-generator": "^4.7.1" } diff --git a/svelte.config.js b/svelte.config.js index 85618815..70484390 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,4 +1,5 @@ -import adapter from '@sveltejs/adapter-node'; +// import adapter from '@sveltejs/adapter-node'; +import adapter from 'svelte-adapter-bun' import preprocess from 'svelte-preprocess'; const config = { -- cgit v1.2.3 From 092add79f39fb8348b5ac05abeaa74bed0557408 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 3 Dec 2023 12:40:41 -0800 Subject: remove balance animation --- bun.lockb | Bin 110919 -> 110919 bytes src/components/Balance.svelte | 8 +++--- src/lib/store.js | 1 - .../(app)/[username]/(profile)/+layout.svelte | 11 ++++----- src/routes/(app)/[username]/(profile)/+page.svelte | 27 ++------------------- src/routes/(app)/buy/+page.svelte | 1 - src/routes/(app)/login/+page.svelte | 2 -- 7 files changed, 11 insertions(+), 39 deletions(-) (limited to 'bun.lockb') diff --git a/bun.lockb b/bun.lockb index 50141b28..f6282c22 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/src/components/Balance.svelte b/src/components/Balance.svelte index fc986b1f..cf926b44 100644 --- a/src/components/Balance.svelte +++ b/src/components/Balance.svelte @@ -1,11 +1,11 @@ {#if show && user.haspin && $pin?.length !== 6} @@ -20,10 +20,10 @@ > {:else}
- {#if isNaN($animatedRate)} + {#if isNaN(rate)}
—
{:else} - {f((user.balance * $animatedRate) / sats, user.currency)} + {f((user.balance * rate) / sats, user.currency)} {/if}
diff --git a/src/lib/store.js b/src/lib/store.js index 2ae8c9b9..ee60058c 100644 --- a/src/lib/store.js +++ b/src/lib/store.js @@ -38,7 +38,6 @@ const persistLocal = (key, defaultValue) => { return s; }; -export const animatedRate = persistLocal("rate", 0); export const avatar = writable(); export const banner = writable(); export const colorTheme = writable("from-primary to-gradient"); diff --git a/src/routes/(app)/[username]/(profile)/+layout.svelte b/src/routes/(app)/[username]/(profile)/+layout.svelte index 604f3fd0..71c282c4 100644 --- a/src/routes/(app)/[username]/(profile)/+layout.svelte +++ b/src/routes/(app)/[username]/(profile)/+layout.svelte @@ -1,7 +1,6 @@
{#if user?.id === subject.id}
- +
{#if !user.balance} diff --git a/src/routes/(app)/buy/+page.svelte b/src/routes/(app)/buy/+page.svelte index 903eb7f4..952d9ff5 100644 --- a/src/routes/(app)/buy/+page.svelte +++ b/src/routes/(app)/buy/+page.svelte @@ -5,7 +5,6 @@ import Card from "$comp/Card.svelte"; import Calendar from "$comp/Calendar.svelte"; import Spinner from "$comp/Spinner.svelte"; - import { animatedRate } from "$lib/store"; import { f } from "$lib/utils"; export let data, form; diff --git a/src/routes/(app)/login/+page.svelte b/src/routes/(app)/login/+page.svelte index 08161cee..7b3ec6ac 100644 --- a/src/routes/(app)/login/+page.svelte +++ b/src/routes/(app)/login/+page.svelte @@ -1,10 +1,8 @@