diff options
| author | Adam Soltys <[email protected]> | 2024-11-16 23:01:57 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-16 23:01:57 -0800 |
| commit | 943f16a25ed6c96c31ae22d212f6f446b0f742e9 (patch) | |
| tree | bdde8dc10e83bfa848704cad83c122c6f6dfe35f /src | |
| parent | 6ed073c854df93b747e642c4245a02db403d801d (diff) | |
| download | coinos-ui-amber.tar.gz coinos-ui-amber.zip | |
wipamber
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/(app)/[username]/(profile)/+page.svelte | 9 | ||||
| -rw-r--r-- | src/routes/(app)/events/+server.ts | 8 | ||||
| -rw-r--r-- | src/routes/amber/[id]/[pubkey]/+server.ts | 6 |
3 files changed, 22 insertions, 1 deletions
diff --git a/src/routes/(app)/[username]/(profile)/+page.svelte b/src/routes/(app)/[username]/(profile)/+page.svelte index b3b91405..c932b4d8 100644 --- a/src/routes/(app)/[username]/(profile)/+page.svelte +++ b/src/routes/(app)/[username]/(profile)/+page.svelte @@ -1,4 +1,6 @@ <script> + import { browser } from "$app/environment"; + import { onMount } from "svelte"; import { scale } from "svelte/transition"; import { btc, f, sat } from "$lib/utils"; import Icon from "$comp/Icon.svelte"; @@ -8,6 +10,7 @@ import { t } from "$lib/translations"; import { installPrompt } from "$lib/store"; import { afterNavigate, preloadData } from "$app/navigation"; + import { page } from "$app/stores"; let { data } = $props(); @@ -28,8 +31,14 @@ }; if (user) user.savings = 0; + let { host } = $derived($page.url); </script> +<a + href={`nostrsigner:?compressionType=none&returnType=signature&type=get_public_key&callbackUrl=http://${host}/amber/${user.id}/`} + rel="external">Get pubkey</a +> + <div class="space-y-2"> {#if user?.id === subject.id} <div class="space-y-5" data-sveltekit-preload-data="false"> diff --git a/src/routes/(app)/events/+server.ts b/src/routes/(app)/events/+server.ts index 42b9f3dd..59fc472e 100644 --- a/src/routes/(app)/events/+server.ts +++ b/src/routes/(app)/events/+server.ts @@ -1,5 +1,11 @@ import { auth, post } from "$lib/utils"; -import { json, error } from "@sveltejs/kit"; +import { error, json } from "@sveltejs/kit"; + +export async function GET({ url }) { + console.log(url.searchParams.get("event")); + console.log(url.searchParams.get("uid")); + return json({}); +} export async function POST({ cookies, request }) { const body = await request.json(); diff --git a/src/routes/amber/[id]/[pubkey]/+server.ts b/src/routes/amber/[id]/[pubkey]/+server.ts new file mode 100644 index 00000000..6a6f69cf --- /dev/null +++ b/src/routes/amber/[id]/[pubkey]/+server.ts @@ -0,0 +1,6 @@ +import { json } from "@sveltejs/kit"; + +export async function GET({ params }) { + console.log(params); + return json({}); +} |
