diff options
| author | Adam Soltys <[email protected]> | 2024-08-19 09:17:23 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-08-19 09:17:23 -0700 |
| commit | 73d4cf6886386a880ee3ca31b0271269ba1ac7ca (patch) | |
| tree | 6f1e4f8a57c917db7fef4e4ab46ba069b76f9f90 /src | |
| parent | 7b18823e0361885e0ac7eab484d5b66425a4c026 (diff) | |
| download | coinos-ui-73d4cf6886386a880ee3ca31b0271269ba1ac7ca.tar.gz coinos-ui-73d4cf6886386a880ee3ca31b0271269ba1ac7ca.zip | |
logging and styles
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/(app)/[username]/ecash/[...token]/+page.svelte | 5 | ||||
| -rw-r--r-- | src/routes/(app)/send/[...text]/+page.svelte | 22 | ||||
| -rw-r--r-- | src/routes/(app)/send/ecash/+page.server.js | 3 |
3 files changed, 18 insertions, 12 deletions
diff --git a/src/routes/(app)/[username]/ecash/[...token]/+page.svelte b/src/routes/(app)/[username]/ecash/[...token]/+page.svelte index d02102a6..e920c6d2 100644 --- a/src/routes/(app)/[username]/ecash/[...token]/+page.svelte +++ b/src/routes/(app)/[username]/ecash/[...token]/+page.svelte @@ -50,12 +50,13 @@ <div class="my-auto">{$t("payments.redeem")}</div> </button> </a> - </div> + <button - class="border rounded p-6 w-full break-all text-xl hover:bg-slate-100" + class="border rounded-2xl px-6 py-5 w-full break-all text-xl hover:bg-slate-100" on:click={() => copy(token)} > {token} </button> + </div> </div> diff --git a/src/routes/(app)/send/[...text]/+page.svelte b/src/routes/(app)/send/[...text]/+page.svelte index e677760f..6517ce65 100644 --- a/src/routes/(app)/send/[...text]/+page.svelte +++ b/src/routes/(app)/send/[...text]/+page.svelte @@ -82,6 +82,7 @@ </button> </div> + <div class="flex gap-2 flex-wrap"> <button bind:this={el} type="submit" @@ -90,17 +91,18 @@ <Icon icon="send" style="w-8 my-auto invert" /> <div class="my-auto">{$t("user.send.next")}</div> </button> - </form> - <a href="/send/ecash"> - <button - type="button" - class="flex border rounded-2xl px-6 py-5 w-full font-bold gap-2 justify-center text-xl" - > - <Icon icon="voucher" style="w-8 my-auto" /> - <div class="my-auto">{$t("payments.createEcash")}</div> - </button> - </a> + <a href="/send/ecash" class="contents"> + <button + type="button" + class="flex border rounded-2xl px-6 py-5 w-full font-bold gap-2 justify-center text-xl bg-primary" + > + <Icon icon="voucher" style="w-8 my-auto" /> + <div class="my-auto">{$t("payments.createEcash")}</div> + </button> + </a> + </div> + </form> {#if contacts.length} <div class="space-y-5"> diff --git a/src/routes/(app)/send/ecash/+page.server.js b/src/routes/(app)/send/ecash/+page.server.js index 2fb43a2f..8541a3f8 100644 --- a/src/routes/(app)/send/ecash/+page.server.js +++ b/src/routes/(app)/send/ecash/+page.server.js @@ -7,13 +7,16 @@ export const actions = { try { let body = await fd(request); ({ token } = await post("/mint", body, auth(cookies))); + console.log("token", token) } catch (e) { + console.log(e) console.log("problem creating ecash", e); return fail(400, { message: e.message }); } cookies.set("ecash", token, { path: "/" }); + console.log("redirecting") redirect(307, `/${cookies.get("username")}/ecash`); }, }; |
