From 32817d7e04956f546589e622f621f9fa497f1719 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 25 Apr 2025 13:52:06 -0700 Subject: login route --- src/routes/(static)/login/[token]/+page.server.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/routes/(static)/login/[token]/+page.server.ts (limited to 'src/routes/(static)') diff --git a/src/routes/(static)/login/[token]/+page.server.ts b/src/routes/(static)/login/[token]/+page.server.ts new file mode 100644 index 00000000..8fe49578 --- /dev/null +++ b/src/routes/(static)/login/[token]/+page.server.ts @@ -0,0 +1,13 @@ +import { redirect } from "@sveltejs/kit"; + +export const load = async ({ cookies, params }) => { + const { token } = params; + const maxAge = 380 * 24 * 60 * 60; + + const expires = new Date(); + expires.setSeconds(expires.getSeconds() + maxAge); + + const opts = { path: "/", expires }; + cookies.set("token", token, opts); + redirect(307, "/login"); +}; -- cgit v1.2.3 From 209b1e64f1c4dda16a50e57c6570a3a35953085d Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 7 Jul 2025 22:34:27 -0700 Subject: fund sweep --- src/lib/random.ts | 20 +++++++++++++ src/lib/utils.ts | 32 ++++++++++++++++++++ src/locales/en.json | 1 + src/routes/(app)/fund/[id]/+page.svelte | 8 +++++ src/routes/(app)/fund/[id]/sweep/+page.server.ts | 24 +++++++++++---- src/routes/(app)/fund/[id]/sweep/+page.svelte | 8 +---- src/routes/(app)/send/[...text]/+page.svelte | 27 +++++++++-------- src/routes/(static)/register/+page.server.ts | 38 ++++-------------------- 8 files changed, 101 insertions(+), 57 deletions(-) create mode 100644 src/lib/random.ts (limited to 'src/routes/(static)') diff --git a/src/lib/random.ts b/src/lib/random.ts new file mode 100644 index 00000000..36dde0cc --- /dev/null +++ b/src/lib/random.ts @@ -0,0 +1,20 @@ +import { + NumberDictionary, + animals, + colors, + uniqueNamesGenerator, +} from "unique-names-generator"; + +export const randomName = () => + uniqueNamesGenerator({ + dictionaries: [animals, NumberDictionary.generate({ min: 10, max: 99 })], + length: 2, + separator: "", + }); + +export const randomPassword = () => + uniqueNamesGenerator({ + dictionaries: [colors, NumberDictionary.generate({ min: 100, max: 999 })], + length: 2, + separator: "", + }); diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 2e1bb840..31d93fde 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -3,6 +3,7 @@ import { goto } from "$app/navigation"; import { page } from "$app/stores"; import { PUBLIC_COINOS_NETWORK, PUBLIC_COINOS_URL } from "$env/static/public"; import { bytesToHex } from "@noble/hashes/utils"; +import { fail as svelteFail, redirect } from "@sveltejs/kit"; import { toast } from "@zerodevx/svelte-toast"; import { differenceInDays, @@ -456,3 +457,34 @@ export const ago = (t) => { const days = differenceInDays(now, date); return `${days}d`; }; + +export const register = async (user, ip, cookies, loginRedirect) => { + let error; + + let sk; + try { + ({ sk } = await post("/register", { user }, { "cf-connecting-ip": ip })); + } catch (e) { + ({ message: error } = e as Error); + } + + try { + await login(user, cookies, ip); + error = null; + } catch (e) { + const { message } = e as Error; + error ||= message; + } + + const expires = new Date(); + expires.setSeconds(expires.getSeconds() + 21000000); + cookies.set("sk", sk, { + path: "/", + expires, + httpOnly: false, + sameSite: "lax", + }); + + if (error) return svelteFail(400, { error }); + redirect(303, loginRedirect || `/${user.username}`); +}; diff --git a/src/locales/en.json b/src/locales/en.json index fa3ad96d..43967158 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -398,6 +398,7 @@ } }, "payments": { + "sweep": "Sweep link", "lockedBalance": "Locked balance", "insufficientFunds": "Insufficient funds", "pending": "Pending", diff --git a/src/routes/(app)/fund/[id]/+page.svelte b/src/routes/(app)/fund/[id]/+page.svelte index f1a1838e..614616af 100644 --- a/src/routes/(app)/fund/[id]/+page.svelte +++ b/src/routes/(app)/fund/[id]/+page.svelte @@ -111,6 +111,14 @@ >
{$t("payments.shareLink")}
+ diff --git a/src/routes/(app)/fund/[id]/sweep/+page.server.ts b/src/routes/(app)/fund/[id]/sweep/+page.server.ts index 5bb42fa4..3e0b8dad 100644 --- a/src/routes/(app)/fund/[id]/sweep/+page.server.ts +++ b/src/routes/(app)/fund/[id]/sweep/+page.server.ts @@ -1,13 +1,27 @@ -import { get, auth, post } from "$lib/utils"; +import { randomName, randomPassword } from "$lib/random"; +import getRates from "$lib/rates"; +import { auth, get, post, register } from "$lib/utils"; import { redirect } from "@sveltejs/kit"; -export async function load({ cookies, params, parent }) { - const { user } = await parent(); +export async function load({ cookies, request, params, parent }) { + let { user } = await parent(); const { id } = params; const { amount } = await get(`/fund/${id}`); + const rates = await getRates(); + const rate = rates[user?.currency || "USD"]; if (!amount) redirect(307, `/fund/${id}`); - if (!user) redirect(307, `/register?redirect=/fund/${id}/sweep`); + if (!user) { + const ip = request.headers.get("cf-connecting-ip"); + + user = { + username: randomName(), + password: randomPassword(), + }; + + await register(user, ip, cookies, `/fund/${id}/sweep`); + } + await post("/take", { amount, id }, auth(cookies)); - return { amount, id }; + return { amount, id, rate, rates }; } diff --git a/src/routes/(app)/fund/[id]/sweep/+page.svelte b/src/routes/(app)/fund/[id]/sweep/+page.svelte index cd89f6ae..0523b85a 100644 --- a/src/routes/(app)/fund/[id]/sweep/+page.svelte +++ b/src/routes/(app)/fund/[id]/sweep/+page.svelte @@ -12,12 +12,6 @@
-
- - - -
-
@@ -32,7 +26,7 @@
- +
diff --git a/src/routes/(app)/send/[...text]/+page.svelte b/src/routes/(app)/send/[...text]/+page.svelte index 183b4b51..e5c77647 100644 --- a/src/routes/(app)/send/[...text]/+page.svelte +++ b/src/routes/(app)/send/[...text]/+page.svelte @@ -73,18 +73,7 @@ {/if} - - - + + + + diff --git a/src/routes/(static)/register/+page.server.ts b/src/routes/(static)/register/+page.server.ts index 2c2807bd..8c6d6a8d 100644 --- a/src/routes/(static)/register/+page.server.ts +++ b/src/routes/(static)/register/+page.server.ts @@ -1,5 +1,5 @@ -import { fd, get, login, post } from "$lib/utils"; -import { fail, redirect } from "@sveltejs/kit"; +import { fd, get, register } from "$lib/utils"; +import { redirect } from "@sveltejs/kit"; export const load = async ({ parent }) => { const { user } = await parent(); @@ -14,39 +14,13 @@ export const load = async ({ parent }) => { export const actions = { default: async ({ cookies, request }) => { const ip = request.headers.get("cf-connecting-ip"); - const form = await fd(request); - let { picture, username, password, pubkey, loginRedirect } = form; - const user = { picture, username, password, pubkey }; - let error; - + const { picture, username, password } = form; + let { loginRedirect } = form; if (loginRedirect === "undefined") loginRedirect = undefined; - let sk; - try { - ({ sk } = await post("/register", { user }, { "cf-connecting-ip": ip })); - } catch (e) { - ({ message: error } = e as Error); - } - - try { - await login(user, cookies, ip); - error = null; - } catch (e) { - const { message } = e as Error; - error ||= message; - } - - const expires = new Date(); - expires.setSeconds(expires.getSeconds() + 21000000); - cookies.set("sk", sk, { - path: "/", - expires, - httpOnly: false, - sameSite: "lax", - }); - - if (error) return fail(400, { error }); + const user = { picture, username, password }; + await register(user, ip, cookies, loginRedirect); redirect(303, loginRedirect || `/${user.username}`); }, }; -- cgit v1.2.3 From c0efcd94f37793348bc0cbe99a47e5fe8df4282a Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 8 Jul 2025 03:05:47 -0700 Subject: inset --- .../app/src/main/java/io/coinos/MainActivity.java | 17 ++++++++++++++++ capacitor.config.json | 23 +++++++++++----------- src/routes/(static)/register/+page.server.ts | 1 - src/routes/+layout.svelte | 11 +++++++++++ 4 files changed, 40 insertions(+), 12 deletions(-) (limited to 'src/routes/(static)') diff --git a/android/app/src/main/java/io/coinos/MainActivity.java b/android/app/src/main/java/io/coinos/MainActivity.java index aaf59abe..791c89a9 100644 --- a/android/app/src/main/java/io/coinos/MainActivity.java +++ b/android/app/src/main/java/io/coinos/MainActivity.java @@ -1,5 +1,11 @@ package io.coinos; +import android.os.Build; +import android.view.View; +import android.view.WindowInsets; +import android.view.WindowManager; +import androidx.core.view.ViewCompat; + import com.getcapacitor.BridgeActivity; import com.getcapacitor.Bridge; import android.content.Intent; @@ -21,12 +27,23 @@ public class MainActivity extends BridgeActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + // Ensure the WebView doesn't overlap the system status bar + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT_WATCH) { + getWindow().clearFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); + } + WebView webView = bridge.getWebView(); CookieManager cookieManager = CookieManager.getInstance(); cookieManager.setAcceptCookie(true); webView.getSettings().setJavaScriptEnabled(true); webView.getSettings().setDomStorageEnabled(true); + // Ensure layout respects system window insets + ViewCompat.setOnApplyWindowInsetsListener(webView, (v, insets) -> { + v.setPadding(0, insets.getSystemWindowInsetTop(), 0, 0); + return insets; + }); + handleIntent(getIntent()); } diff --git a/capacitor.config.json b/capacitor.config.json index 585ff21c..a31c19db 100644 --- a/capacitor.config.json +++ b/capacitor.config.json @@ -1,13 +1,14 @@ { - "appId": "io.coinos", - "appName": "Coinos", - "server": { - "hostname": "coinos.io", - "url": "https://coinos.io/start" - }, - "android": { - "webContentsDebuggingEnabled": true, - "allowMixedContent": true, - "useBrowserHistory": true - } + "appId": "io.coinos", + "appName": "Coinos", + "server": { + "hostname": "coinos.io", + "url": "https://coinos.io/start" + }, + "android": { + "webContentsDebuggingEnabled": true, + "allowMixedContent": true, + "useBrowserHistory": true, + "immersive": false + } } diff --git a/src/routes/(static)/register/+page.server.ts b/src/routes/(static)/register/+page.server.ts index 8c6d6a8d..44aa69d3 100644 --- a/src/routes/(static)/register/+page.server.ts +++ b/src/routes/(static)/register/+page.server.ts @@ -21,6 +21,5 @@ export const actions = { const user = { picture, username, password }; await register(user, ip, cookies, loginRedirect); - redirect(303, loginRedirect || `/${user.username}`); }, }; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index d25f570a..f2c567fa 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -61,4 +61,15 @@ --toastContainerLeft: calc(50vw - 8rem); --toastBackground: #292929; } + + main { + padding-top: constant(safe-area-inset-top); + padding-top: env(safe-area-inset-top); + } + + @supports not (padding-top: env(safe-area-inset-top)) { + main { + padding-top: 24px; + } + } -- cgit v1.2.3 From ee8e20ce1dbcc0476ec698dd8c9d0ff99e260db7 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 9 Jul 2025 12:09:08 -0700 Subject: update docs --- src/routes/(static)/docs/+page.svelte | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/routes/(static)') diff --git a/src/routes/(static)/docs/+page.svelte b/src/routes/(static)/docs/+page.svelte index 7ac6e013..f53787e5 100644 --- a/src/routes/(static)/docs/+page.svelte +++ b/src/routes/(static)/docs/+page.svelte @@ -105,16 +105,18 @@
Request params
-
type
+
type (string, default: lightning)
bitcoin or lightning
-
amount
-
amount in satoshis
-
webhook
+
fiat (boolean, default: false)
+
whether the amount is denominated in satoshis or local currency
+
amount (numeric)
+
amount to be paid
+
webhook (string, optional)
- (optional) endpoint to hit when the invoice is paid + remote endpoint to call when the invoice is paid
-
secret
-
a secret for the webhook to check
+
secret (string, optional)
+
a secret value passed to the webhook to authenticate the request
-- cgit v1.2.3 From 65f03f2f5cf62b63728790d6c6ea45e8fdb7be2d Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 14 Aug 2025 16:24:33 -0700 Subject: bounties update --- src/routes/(static)/bounties/+page.server.ts | 18 +++ src/routes/(static)/bounties/+page.svelte | 188 +++++++++++++++++---------- 2 files changed, 136 insertions(+), 70 deletions(-) create mode 100644 src/routes/(static)/bounties/+page.server.ts (limited to 'src/routes/(static)') diff --git a/src/routes/(static)/bounties/+page.server.ts b/src/routes/(static)/bounties/+page.server.ts new file mode 100644 index 00000000..f74cda99 --- /dev/null +++ b/src/routes/(static)/bounties/+page.server.ts @@ -0,0 +1,18 @@ +import { get } from "$lib/utils"; +export const load = async () => { + const users = [ + { username: "fustler", merchant: "rrdrive", type: "Bakery" }, + { username: "danielle", merchant: "butchersblock", type: "Butcher" }, + { username: "ica547", merchant: "vanlove", type: "Sushi Restaurant" }, + { username: "reverendhodl", merchant: "laughingbean", type: "Cafe" }, + ]; + + for (const user of users) { + const { username, merchant } = user; + console.log(username, merchant); + user.user = await get(`/users/${username}`); + user.merchant = await get(`/users/${merchant}`); + } + + return { users }; +}; diff --git a/src/routes/(static)/bounties/+page.svelte b/src/routes/(static)/bounties/+page.svelte index b53dc85d..186634e4 100644 --- a/src/routes/(static)/bounties/+page.svelte +++ b/src/routes/(static)/bounties/+page.svelte @@ -1,96 +1,144 @@ -
-

Bounties

+ + +
+

Coinos Bounties

+ +

Earn sats by referring us to local businesses in Vancouver!

+ +

Currently Available

+ +
+ {#each bounties as b} +
+
{b}
+ + {s(10000, "en-CA")} +
+ {/each} +
+ +

Previously Awarded

+ +
+ {#each users as { user, merchant, type }} +
- -
  • Pizza by the Slice
  • -
  • Liquor Store / Gas Station
  • -
  • Bubble Tea / Ice Cream Parlour
  • - +
    +
    + +
    -

    Eligible businesses:

    +
    +
    +

    + {merchant.display || merchant.username} +

    -
      -
    • - Have a physical location in Vancouver, North Vancouver, West Vancouver, - Burnaby, New Westminster, or Richmond -
    • -
    • Take walk-in customers
    • + + {type} + +
    + +
    + + Referred by @{user.username} +
    +
    + +
    + + + {s(1000000, "en-CA")} + +
    +
    +
    + {/each} +
    + +

    Terms and Conditions

    + +

    One bounty per person

    + +
    Eligible business should:
    + +
      +
    • Have a physical location in Greater Vancouver
    • +
    • Take walk-ins
    • Have regular hours and a website with contact info
    • -
    • Have a 3 star or better rating on Google
    • +
    • Have at least a 3-star rating on Google
    • +
    + +
    They will be expected to:
    + +
      +
    • Display a Bitcoin Accepted window sticker and payment QR
    • +
    • Train staff on Bitcoin procedures
    • - Accept bitcoin during their posted hours without needing to make any - special arrangements + Accept Bitcoin during all posted hours
    • -
    • Use Coinos
    -

    Each business category can be claimed only once

    -

    One bounty per person

    -

    - The businesses can expect free ongoing support and promotion from us and our - community. + 25% of the bounty will be awarded once the business has met with us and is + ready to take payments and has been announced by us

    -

    The prize money will be offered to the person who makes the referral.

    - -

    - ⚡️250,000 will be awarded once the business has met with us and is ready - to take payments -

    - ⚡️750,000 will be awarded once the merchant has accepted bitcoin for - 6 months. We'll be sending - shadowy supertaggers to check up on them periodically. + The rest will be awarded once they've been continuously + accepting Bitcoin for 6 months

    - Bounties will be awarded solely at our discretion and we reserve the right - to refuse any applicants without cause + Bounties will be awarded solely at our discretion. We reserve the right + to refuse applicants and change these terms without cause

    -

    Ready to begin!?

    +

    Get Started!

    - To make a referral, reach out on one of our socials or email us at bounties@coinos.io and we'll set up an appointment with you and the business owner to get started. + > and let us know who we should contact

    -- cgit v1.2.3 From 41619dfa2c81bc03b54acb4629432c07a2c93353 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 14 Aug 2025 16:32:33 -0700 Subject: fix bounties --- src/routes/(static)/bounties/+page.server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/routes/(static)') diff --git a/src/routes/(static)/bounties/+page.server.ts b/src/routes/(static)/bounties/+page.server.ts index f74cda99..7005e276 100644 --- a/src/routes/(static)/bounties/+page.server.ts +++ b/src/routes/(static)/bounties/+page.server.ts @@ -2,7 +2,7 @@ import { get } from "$lib/utils"; export const load = async () => { const users = [ { username: "fustler", merchant: "rrdrive", type: "Bakery" }, - { username: "danielle", merchant: "butchersblock", type: "Butcher" }, + { username: "laluna", merchant: "butchersguild", type: "Butcher" }, { username: "ica547", merchant: "vanlove", type: "Sushi Restaurant" }, { username: "reverendhodl", merchant: "laughingbean", type: "Cafe" }, ]; -- cgit v1.2.3 From 065715201a063bd6d4816875e55ed8fb03618fff Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 14 Aug 2025 16:39:12 -0700 Subject: bounties links --- src/routes/(static)/bounties/+page.server.ts | 2 +- src/routes/(static)/bounties/+page.svelte | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) (limited to 'src/routes/(static)') diff --git a/src/routes/(static)/bounties/+page.server.ts b/src/routes/(static)/bounties/+page.server.ts index 7005e276..c9d872b0 100644 --- a/src/routes/(static)/bounties/+page.server.ts +++ b/src/routes/(static)/bounties/+page.server.ts @@ -2,7 +2,7 @@ import { get } from "$lib/utils"; export const load = async () => { const users = [ { username: "fustler", merchant: "rrdrive", type: "Bakery" }, - { username: "laluna", merchant: "butchersguild", type: "Butcher" }, + { username: "laluna", merchant: "butchersguild", type: "Butcher Shop" }, { username: "ica547", merchant: "vanlove", type: "Sushi Restaurant" }, { username: "reverendhodl", merchant: "laughingbean", type: "Cafe" }, ]; diff --git a/src/routes/(static)/bounties/+page.svelte b/src/routes/(static)/bounties/+page.svelte index 186634e4..400e2bc3 100644 --- a/src/routes/(static)/bounties/+page.svelte +++ b/src/routes/(static)/bounties/+page.svelte @@ -56,10 +56,10 @@

    - {merchant.display || merchant.username} + {merchant.display || merchant.username}

    Thanks for participating and helping to orange pill Vancouver!

    - - -- cgit v1.2.3 From d57ec3ffedf80ca592b2d566f096f89d1c0f2b11 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 14 Aug 2025 21:44:58 -0700 Subject: bounties update --- src/routes/(static)/bounties/+page.svelte | 69 +++++++++++++++++++++++-------- 1 file changed, 51 insertions(+), 18 deletions(-) (limited to 'src/routes/(static)') diff --git a/src/routes/(static)/bounties/+page.svelte b/src/routes/(static)/bounties/+page.svelte index 400e2bc3..c466e040 100644 --- a/src/routes/(static)/bounties/+page.svelte +++ b/src/routes/(static)/bounties/+page.svelte @@ -18,6 +18,17 @@ "Pet Store", "Pharmacy", ]; + + let small = [ + { + type: "Restaurant", + amount: 5000, + }, + { type: "Cafe", amount: 3000 }, + { type: "Tradesperson or Professional", amount: 2500 }, + { type: "Food Truck", amount: 2000 }, + { type: "Farmer's Market Vendor", amount: 2000 }, + ];
    @@ -27,10 +38,10 @@

    Currently Available

    -
    +
    {#each bounties as b} -
    -
    {b}
    +
    +
    First {b}
    +
    + +
    + {#each small as b} +
    +
    {b.type}
    + + {s(b.amount, "en-CA")} +
    + {/each} +
    +

    Previously Awarded

    -
    +
    {#each users as { user, merchant, type }}
    -
    +
    @@ -59,7 +86,9 @@ class="whitespace-wrap text-base font-semibold max-w-[150px] truncate sm:max-w-full" title={merchant.display || merchant.username} > - {merchant.display || merchant.username} + {merchant.display || merchant.username} One bounty per person

    -
    Eligible business should:
    +
    Eligible businesses should:
    • Have a physical location in Greater Vancouver
    • @@ -112,24 +141,23 @@
      • Display a Bitcoin Accepted window sticker and payment QR
      • Train staff on Bitcoin procedures
      • -
      • - Accept Bitcoin during all posted hours -
      • +
      • Accept Bitcoin during all posted hours

      - 25% of the bounty will be awarded once the business has met with us and is - ready to take payments and has been announced by us + 25% of the bounty will be awarded once the business is ready to take + payments and has been announced

      - The rest will be awarded once they've been continuously - accepting Bitcoin for 6 months + The rest will be awarded once they've been accepting Bitcoin for 6 months

      +

      Bounties will be awarded at our discretion

      +

      - Bounties will be awarded solely at our discretion. We reserve the right - to refuse applicants and change these terms without cause + We reserve the right to refuse applicants and change these terms without + cause or notice

      Get Started!

      @@ -137,7 +165,7 @@

      Reach out to bounties@coinos.iobounties@coinos.io and let us know who we should contact

      @@ -146,5 +174,10 @@ which ones are still available.

      +

      + Have a lead or idea for something that's not on the list? Reach out! We offer + sats for all sorts of referrals! +

      +

      Thanks for participating and helping to orange pill Vancouver!

    -- cgit v1.2.3 From ae649b455ce2103ac9a94d8d30c478181caf25c0 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 14 Aug 2025 21:50:27 -0700 Subject: remove padding --- src/routes/(static)/bounties/+page.svelte | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/routes/(static)') diff --git a/src/routes/(static)/bounties/+page.svelte b/src/routes/(static)/bounties/+page.svelte index c466e040..1f88b558 100644 --- a/src/routes/(static)/bounties/+page.svelte +++ b/src/routes/(static)/bounties/+page.svelte @@ -32,7 +32,7 @@
    -

    Coinos Bounties

    +

    Coinos Bounties

    Earn sats by referring us to local businesses in Vancouver!

    @@ -131,17 +131,17 @@
    • Have a physical location in Greater Vancouver
    • -
    • Take walk-ins
    • -
    • Have regular hours and a website with contact info
    • +
    • Take walk-ins without appointments
    • +
    • Have a website with contact info
    • Have at least a 3-star rating on Google
    They will be expected to:
      -
    • Display a Bitcoin Accepted window sticker and payment QR
    • +
    • Display a "Bitcoin Accepted" window sticker and payment QR
    • Train staff on Bitcoin procedures
    • -
    • Accept Bitcoin during all posted hours
    • +
    • Accept Bitcoin during posted business hours

    -- cgit v1.2.3 From fcd4e03befdba4355487a035d4be0df7ffcde318 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 14 Aug 2025 21:51:30 -0700 Subject: remove padding --- src/routes/(static)/bounties/+page.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/routes/(static)') diff --git a/src/routes/(static)/bounties/+page.svelte b/src/routes/(static)/bounties/+page.svelte index 1f88b558..7e284199 100644 --- a/src/routes/(static)/bounties/+page.svelte +++ b/src/routes/(static)/bounties/+page.svelte @@ -139,7 +139,7 @@

    They will be expected to:
      -
    • Display a "Bitcoin Accepted" window sticker and payment QR
    • +
    • Display a window sticker and QR
    • Train staff on Bitcoin procedures
    • Accept Bitcoin during posted business hours
    -- cgit v1.2.3 From 1cde30d1d8ca999fc7f22c4b7ab1826ede16827b Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 14 Aug 2025 22:12:13 -0700 Subject: flex issues --- src/routes/(static)/bounties/+page.svelte | 42 ++++++++++++++++--------------- 1 file changed, 22 insertions(+), 20 deletions(-) (limited to 'src/routes/(static)') diff --git a/src/routes/(static)/bounties/+page.svelte b/src/routes/(static)/bounties/+page.svelte index 7e284199..1cf28944 100644 --- a/src/routes/(static)/bounties/+page.svelte +++ b/src/routes/(static)/bounties/+page.svelte @@ -75,27 +75,29 @@
    -
    -
    - -
    - +
    -
    -

    - {merchant.display || merchant.username} +
    + +
    + +

    - - {type} - + + {type} + +

    - 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!

    Thanks for participating and helping to orange pill Vancouver!

    -- cgit v1.2.3 From 6f88ec27d747c3788f94c5e369c94d576abec73e Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 15 Aug 2025 07:59:17 -0700 Subject: fix bounties --- src/routes/(static)/bounties/+page.svelte | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/routes/(static)') diff --git a/src/routes/(static)/bounties/+page.svelte b/src/routes/(static)/bounties/+page.svelte index 1cf28944..db7a012b 100644 --- a/src/routes/(static)/bounties/+page.svelte +++ b/src/routes/(static)/bounties/+page.svelte @@ -22,12 +22,12 @@ let small = [ { type: "Restaurant", - amount: 5000, + amount: 50000, }, - { type: "Cafe", amount: 3000 }, - { type: "Tradesperson or Professional", amount: 2500 }, - { type: "Food Truck", amount: 2000 }, - { type: "Farmer's Market Vendor", amount: 2000 }, + { type: "Cafe", amount: 30000 }, + { type: "Tradesperson or Professional", amount: 25000 }, + { type: "Food Truck", amount: 20000 }, + { type: "Farmer's Market Vendor", amount: 20000 }, ]; @@ -47,7 +47,7 @@ noobserver icon="ph:lightning-fill" class="text-yellow-300 ml-auto" - >{s(10000, "en-CA")} + >{s(100000, "en-CA")}
    {/each}
    -- cgit v1.2.3 From e36cd96dc66c41d272073f48bd63cd55f9206e71 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 28 Aug 2025 09:07:31 -0700 Subject: log referer --- src/routes/(static)/login/+page.server.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'src/routes/(static)') diff --git a/src/routes/(static)/login/+page.server.ts b/src/routes/(static)/login/+page.server.ts index a24abd07..ffe6335d 100644 --- a/src/routes/(static)/login/+page.server.ts +++ b/src/routes/(static)/login/+page.server.ts @@ -11,6 +11,7 @@ export const load = async ({ parent }) => { export const actions = { login: async ({ cookies, request }) => { + console.log(request.headers.get('referer')); const form = await fd(request); let { username, password, token, loginRedirect } = form; const user = { username, password, token }; -- cgit v1.2.3 From ff676c80fb7e7056a9d0178c6d4ddc1c060ff8cc Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 8 Sep 2025 10:47:57 -0700 Subject: show registration failure --- src/routes/(static)/register/+page.server.ts | 2 +- src/routes/(static)/register/+page.svelte | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/routes/(static)') diff --git a/src/routes/(static)/register/+page.server.ts b/src/routes/(static)/register/+page.server.ts index 44aa69d3..cddd97ea 100644 --- a/src/routes/(static)/register/+page.server.ts +++ b/src/routes/(static)/register/+page.server.ts @@ -20,6 +20,6 @@ export const actions = { if (loginRedirect === "undefined") loginRedirect = undefined; const user = { picture, username, password }; - await register(user, ip, cookies, loginRedirect); + return register(user, ip, cookies, loginRedirect); }, }; diff --git a/src/routes/(static)/register/+page.svelte b/src/routes/(static)/register/+page.svelte index 43cafe6e..edb63de1 100644 --- a/src/routes/(static)/register/+page.svelte +++ b/src/routes/(static)/register/+page.svelte @@ -263,9 +263,10 @@
    - {#if form?.error} + {#if form?.error || form?.message}
    - {form.error} + {form?.message} + {form?.error}
    {/if} -- cgit v1.2.3 From 71f72613f2540fbe3ee1e68a2fb9a29c6f52b7c3 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 9 Sep 2025 14:58:59 -0700 Subject: daisy fixes --- src/app.css | 99 +++++++++++--------------- src/routes/(app)/settings/nostr/+page.svelte | 38 +++++----- src/routes/(app)/settings/profile/+page.svelte | 4 +- src/routes/(static)/login/+page.svelte | 2 +- src/routes/(static)/register/+page.svelte | 2 +- 5 files changed, 66 insertions(+), 79 deletions(-) (limited to 'src/routes/(static)') diff --git a/src/app.css b/src/app.css index c04131bd..fca47b23 100644 --- a/src/app.css +++ b/src/app.css @@ -1,50 +1,59 @@ +/* 1) Load Tailwind first */ @import "tailwindcss"; @tailwind base; @tailwind components; @tailwind utilities; - -@font-face { - font-family: "PublicSans"; - src: url("/fonts/Public_Sans/static/PublicSans-Regular.ttf") - format("truetype"); +/* 2) Register DaisyUI themes */ +@plugin "daisyui" { + themes: lofi --default, black --prefersdark; } -html { - font-family: PublicSans, sans-serif; +@plugin "daisyui/theme" { + name: "lofi"; + default: true; + --gradient: #C3CFE2; + --color-error: #b91c1c; } -::selection { - color: black; - background: #eaf2ff; +@plugin "daisyui/theme" { + name: "black"; + prefersdark: true; + --gradient: #C3CFE2; + --color-secondary: #CCC; + --color-error: #f87171; } -:fullscreen { - background-color: white; -} +/* 3) Tell Tailwind which layers we’ll @apply from */ +@reference utilities; +@reference components; -input:not([type="range"]) { - @apply input +/* 4) Now your custom CSS that uses @apply */ +.btn-menu { + @apply flex justify-center items-center bg-base-100 p-2 rounded-full + w-12 h-12 sm:w-16 sm:h-16 drop-shadow-xl; } -.input { - @apply input-lg input-primary; +@font-face { + font-family: "PublicSans"; + src: url("/fonts/Public_Sans/static/PublicSans-Regular.ttf") format("truetype"); } -textarea { - @apply textarea textarea-lg textarea-primary; -} +html { font-family: PublicSans, sans-serif; } -select { - @apply select select-lg select-primary; -} +::selection { color: black; background: #eaf2ff; } +:fullscreen { background-color: white; } -input:not([type="range"]), textarea, select, .input { - @apply w-full rounded-2xl; -} +/* Note: @apply-ing DaisyUI component classes requires components reference */ +.input { @apply input-lg input-primary h-16 px-4; } + +/* If you want to *turn* native inputs into DaisyUI inputs via @apply: */ +input:not([type="range"]) { @apply input input-lg input-primary h-16 px-4; } +textarea { @apply textarea textarea-lg textarea-primary py-4; } +select { @apply select select-lg select-primary h-16 px-4; } -textarea:focus, textarea:focus-within, .input:focus, .input:focus-within { - @apply outline-offset-0; +input:not([type="range"]), textarea, select, .input { + @apply rounded-2xl w-full; } input.clean, textarea.clean { @@ -56,33 +65,11 @@ input.clean, textarea.clean { box-shadow: none !important; } -.btn { - @apply rounded-2xl btn-lg btn-block outline-none -} - -@plugin "daisyui" { - themes: light --default, dark --prefersdark; -} - -@plugin "daisyui/theme" { - name: "light"; - default: true; - - --gradient: #C3CFE2; - --color-error: #b91c1c; - --color-primary: #000; - --color-secondary: #111; -} - -@plugin "daisyui/theme" { - name: "dark"; - prefersdark: true; - - --gradient: #C3CFE2; - --color-primary: #FFF; - --color-secondary: #CCC; - --color-error: #f87171; -} +button { cursor: pointer !important; } +.btn { @apply rounded-2xl btn-lg btn-block outline-none h-16 cursor-pointer; } -:root, [data-theme="dark"] { +@layer components { + :where(input, textarea, select, .input, .textarea, .select) { + outline-offset: 0 !important; + } } diff --git a/src/routes/(app)/settings/nostr/+page.svelte b/src/routes/(app)/settings/nostr/+page.svelte index 421b590a..9129e8f3 100644 --- a/src/routes/(app)/settings/nostr/+page.svelte +++ b/src/routes/(app)/settings/nostr/+page.svelte @@ -163,25 +163,25 @@
    {$t("user.nostrPubkey")}
    -
    - -
    - - - - + +
    +
    + + + + +
    diff --git a/src/routes/(app)/settings/profile/+page.svelte b/src/routes/(app)/settings/profile/+page.svelte index ec9855d0..3b7de9d3 100644 --- a/src/routes/(app)/settings/profile/+page.svelte +++ b/src/routes/(app)/settings/profile/+page.svelte @@ -116,7 +116,7 @@ > handleFile(e, "picture")} /> @@ -158,7 +158,7 @@ > handleFile(e, "banner")} /> diff --git a/src/routes/(static)/login/+page.svelte b/src/routes/(static)/login/+page.svelte index 1a1f745c..825f6a88 100644 --- a/src/routes/(static)/login/+page.svelte +++ b/src/routes/(static)/login/+page.svelte @@ -124,7 +124,7 @@

    {$t("login.signIn")}

    {#if form?.error && !form?.message.includes("2fa")} diff --git a/src/routes/(static)/register/+page.svelte b/src/routes/(static)/register/+page.svelte index edb63de1..b0368d47 100644 --- a/src/routes/(static)/register/+page.svelte +++ b/src/routes/(static)/register/+page.svelte @@ -222,7 +222,7 @@

    {$t("login.createAccount")}

    handleFile(e, "picture")} /> -- cgit v1.2.3