aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-02-26 13:59:58 -0800
committerAdam Soltys <[email protected]>2025-02-26 13:59:58 -0800
commite41b139050143ffec87116db1d9094c785776cdc (patch)
tree4cd42c851abc7dac9e4808a2f98a2678adbd0a2b /src/routes/(app)
parent66b5069777414d2f1e70b8a0804d7712e09b8304 (diff)
downloadcoinos-ui-e41b139050143ffec87116db1d9094c785776cdc.tar.gz
coinos-ui-e41b139050143ffec87116db1d9094c785776cdc.zip
submit postmessage after form submission
Diffstat (limited to 'src/routes/(app)')
-rw-r--r--src/routes/(app)/apps/new/+page.server.ts2
-rw-r--r--src/routes/(app)/apps/new/+page.svelte17
2 files changed, 1 insertions, 18 deletions
diff --git a/src/routes/(app)/apps/new/+page.server.ts b/src/routes/(app)/apps/new/+page.server.ts
index 3fe18128..d8cd4e0f 100644
--- a/src/routes/(app)/apps/new/+page.server.ts
+++ b/src/routes/(app)/apps/new/+page.server.ts
@@ -8,7 +8,7 @@ export const load = async ({ parent, url }) => {
if (!user)
redirect(
307,
- `/register?redirect=${encodeURIComponent(url.pathname + url.search)}`,
+ `/login?redirect=${encodeURIComponent(url.pathname + url.search)}`,
);
const app = {
diff --git a/src/routes/(app)/apps/new/+page.svelte b/src/routes/(app)/apps/new/+page.svelte
index cd710cfb..194840a8 100644
--- a/src/routes/(app)/apps/new/+page.svelte
+++ b/src/routes/(app)/apps/new/+page.svelte
@@ -1,26 +1,9 @@
<script>
- import { page } from "$app/stores";
- import { onMount } from "svelte";
- import { browser } from "$app/environment";
import { t } from "$lib/translations";
import AppForm from "$comp/AppForm.svelte";
- import { untrack } from "svelte";
- import {
- PUBLIC_COINOS_PUBKEY as walletPubkey,
- PUBLIC_COINOS_RELAY as relayUrl,
- } from "$env/static/public";
let { data, form } = $props();
let { app, rate, user } = $derived(data);
- let lud16 = $derived(`${user.username}@${$page.url.host}`);
-
- onMount(() => {
- if (browser) {
- if (window.opener) {
- window.opener.postMessage({ relayUrl, lud16, walletPubkey }, "*");
- }
- }
- });
</script>
<div class="container px-4 max-w-lg mx-auto space-y-5 mt-20">