diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/nostr.ts | 4 | ||||
| -rw-r--r-- | src/routes/+page.svelte | 116 |
2 files changed, 50 insertions, 70 deletions
diff --git a/src/lib/nostr.ts b/src/lib/nostr.ts index 1bd26144..2e3ea142 100644 --- a/src/lib/nostr.ts +++ b/src/lib/nostr.ts @@ -103,9 +103,7 @@ export const getPrivateKey = async (user: User): Promise<Uint8Array> => { export const getMnemonic = async (user: User) => { const { cipher, salt } = user; - let entropy; - - entropy = new Uint8Array( + const entropy = new Uint8Array( await crypto.subtle.decrypt( { name: "AES-GCM", iv: new Uint8Array(16) }, await stretch(await getPassword(), Buffer.from(salt, "hex")), diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 998673f9..9ba12800 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,6 +1,4 @@ <script lang="ts"> - import { run } from "svelte/legacy"; - import LandingHeader from "$comp/LandingHeader.svelte"; import LandingHero from "$comp/LandingHero.svelte"; import LandingInfoCard from "$comp/LandingInfoCard.svelte"; @@ -15,10 +13,6 @@ let { data } = $props(); let { faqs, locations, user } = $state(data); - let update = (data) => ({ faqs, locations, user } = data); - run(() => { - update(data); - }); let howItWorks = $state(); let faq = $state(); @@ -29,77 +23,65 @@ { image: "coinos:bolt", stepID: "step2" }, { image: "coinos:smile", stepID: "step3" }, ]; +</script> - let loaded = $state(); - - let observer; - - onMount(async () => { - loaded = true; - }); +<LandingHeader {howItWorks} {faq} {about} {user} /> - onDestroy(() => (loaded = false)); -</script> +<main class="space-y-40 py-20 md:py-32 lg:py-36 xl:py-40 px-5 md:px-0"> + <LandingHero /> + <LandingInfoCard + image="lightning-qr" + title={$t("landing.info1.title")} + description={$t("landing.info1.description")} + /> -{#if loaded} - <LandingHeader {howItWorks} {faq} {about} {user} /> + <LandingInfoCard + image="phone-checkout" + title={$t("landing.info2.title")} + order="reverse" + > + {$t("landing.info2.description1")} + <br /><br /> + {$t("landing.info2.description2")} + <br /><br /> + {@html $t("landing.info2.description3")} + </LandingInfoCard> - <main class="space-y-40 py-20 md:py-32 lg:py-36 xl:py-40 px-5 md:px-0"> - <LandingHero /> + <div> <LandingInfoCard - image="lightning-qr" - title={$t("landing.info1.title")} - description={$t("landing.info1.description")} + image="customize" + title={$t("landing.info3.title")} + description={$t("landing.info3.description")} /> + <div bind:this={howItWorks}></div> + <div id="about"></div> + </div> - <LandingInfoCard - image="phone-checkout" - title={$t("landing.info2.title")} - order="reverse" - > - {$t("landing.info2.description1")} - <br /><br /> - {$t("landing.info2.description2")} - <br /><br /> - {@html $t("landing.info2.description3")} - </LandingInfoCard> - - <div> - <LandingInfoCard - image="customize" - title={$t("landing.info3.title")} - description={$t("landing.info3.description")} - /> - <div bind:this={howItWorks}></div> - <div id="about"></div> + <div> + <h3 class="text-5xl font-medium mb-10 text-center"> + {$t("howItWorks.header")} + </h3> + <div class="grid lg:grid-cols-3 space-y-10 lg:space-y-0 text-center"> + {#each howItWorksSteps as step} + <HowItWorksCard image={step.image} stepID={step.stepID} /> + {/each} </div> + <div bind:this={faq}></div> + </div> - <div> - <h3 class="text-5xl font-medium mb-10 text-center"> - {$t("howItWorks.header")} + <div> + <div class="space-y-10"> + <h3 class="text-5xl font-medium text-center pt-40 -mt-40" id="faq"> + {$t("faq.header")} </h3> - <div class="grid lg:grid-cols-3 space-y-10 lg:space-y-0 text-center"> - {#each howItWorksSteps as step} - <HowItWorksCard image={step.image} stepID={step.stepID} /> - {/each} - </div> - <div bind:this={faq}></div> - </div> - - <div> - <div class="space-y-10"> - <h3 class="text-5xl font-medium text-center pt-40 -mt-40" id="faq"> - {$t("faq.header")} - </h3> - {#each faqs as f} - <FaqCard questionID={f} /> - {/each} - </div> - <div bind:this={about}></div> + {#each faqs as f} + <FaqCard questionID={f} /> + {/each} </div> + <div bind:this={about}></div> + </div> - <About /> - </main> + <About /> +</main> - <Footer /> -{/if} +<Footer /> |
