Files
fnx_web/svelte/src/layout/checkout/PickName.svelte

53 lines
1.2 KiB
Svelte
Raw Normal View History

<script lang="ts">
2026-06-10 23:53:03 +02:00
import { put_user } from "lib/NovaAPI";
import { type CheckoutState } from "./CheckoutLib";
2025-10-13 16:05:50 +02:00
let { status = $bindable() }: {
status: CheckoutState;
} = $props();
let name: string = $state()
const submit = async (e: SubmitEvent) => {
e.preventDefault()
try {
await put_user({checkout_name: name})
} catch(err) {
alert("Failed to update user:"+ err)
}
2025-10-13 16:05:50 +02:00
status.name = name
}
</script>
2025-10-13 16:05:50 +02:00
<form class="name_form" onsubmit={submit}>
<div>
This payment provider requires a name for checkout. Please enter your
full name below
</div>
<input bind:value={name} type="text" autocomplete="name"/>
<button type="submit" class="button_highlight" style="align-self: end;">
Continue
<i class="icon">chevron_right</i>
</button>
</form>
<hr/>
<p style="text-align: initial;">
2026-06-10 23:53:03 +02:00
This Nova premium plan costs €1 per month, but due to processing fees we
can't accept payments less than €10. So your deposit will give roughly 10
months of premium service depending on usage. You can track your spending on
the <a href="/user/prepaid/transactions">transactions page</a>.
</p>
<style>
.name_form {
display: flex;
flex-direction: column;
margin: auto;
width: 500px;
max-width: 100%;
}
</style>