Files
fnx_web/svelte/src/layout/checkout/PickName.svelte
T
Pixeldrain-Server 5788f5a8b4 Update to Material Symbols and switch to class names for icons
The switch to class names is for accessibility. Class names are not translated by browser translation plugins and not read by screen readers.
2026-11-09 20:26:23 +01:00

53 lines
1.2 KiB
Svelte

<script lang="ts">
import { put_user } from "lib/NovaAPI";
import { type CheckoutState } from "./CheckoutLib";
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)
}
status.name = name
}
</script>
<form class="name_form" onsubmit={submit}>
<div class="text">
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 i_chevron_right"></i>
</button>
</form>
<hr/>
<p class="text">
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/subscription/transactions">transactions page</a>.
</p>
<style>
.name_form {
display: flex;
flex-direction: column;
margin: auto;
width: 500px;
max-width: 100%;
}
</style>