aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-11-16 23:01:57 -0800
committerAdam Soltys <[email protected]>2024-11-16 23:01:57 -0800
commit943f16a25ed6c96c31ae22d212f6f446b0f742e9 (patch)
treebdde8dc10e83bfa848704cad83c122c6f6dfe35f /src/routes
parent6ed073c854df93b747e642c4245a02db403d801d (diff)
downloadcoinos-ui-amber.tar.gz
coinos-ui-amber.zip
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/(app)/[username]/(profile)/+page.svelte9
-rw-r--r--src/routes/(app)/events/+server.ts8
-rw-r--r--src/routes/amber/[id]/[pubkey]/+server.ts6
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({});
+}