aboutsummaryrefslogtreecommitdiffstats
path: root/code/app/src/routes/(main)/(public)/sign-up
diff options
context:
space:
mode:
Diffstat (limited to 'code/app/src/routes/(main)/(public)/sign-up')
-rw-r--r--code/app/src/routes/(main)/(public)/sign-up/+page.svelte44
-rw-r--r--code/app/src/routes/(main)/(public)/sign-up/+page.ts11
2 files changed, 33 insertions, 22 deletions
diff --git a/code/app/src/routes/(main)/(public)/sign-up/+page.svelte b/code/app/src/routes/(main)/(public)/sign-up/+page.svelte
index 58940ea..d111042 100644
--- a/code/app/src/routes/(main)/(public)/sign-up/+page.svelte
+++ b/code/app/src/routes/(main)/(public)/sign-up/+page.svelte
@@ -1,10 +1,10 @@
<script lang="ts">
- import {goto} from "$app/navigation";
- import type {CreateAccountPayload} from "$api/account";
- import {Button, Input, Alert} from "$components";
+ import { goto } from "$app/navigation";
+ import type { CreateAccountPayload } from "$api/account";
+ import { Button, Input, Alert } from "$components";
import LL from "$i18n/i18n-svelte";
- import {FormError} from "$models/internal/FormError";
- import {AccountService} from "$services/account-service";
+ import { FormError } from "$models/internal/FormError";
+ import { AccountService } from "$services/account-service";
const formData = {
username: {
@@ -76,30 +76,30 @@
<div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
<div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
{#if showErrorAlert}
- <Alert title={formError.title} message={formError.subtitle} type="error" class="mb-2"/>
+ <Alert title={formError.title} message={formError.subtitle} type="error" class="mb-2" />
{/if}
<form class="space-y-6" on:submit|preventDefault={submit_form_async}>
<Input
- label={$LL.emailAddress()}
- id="email"
- name="email"
- autocomplete="email"
- required
- type="email"
- bind:value={formData.username.value}
- errors={formData.username.errors}
+ label={$LL.emailAddress()}
+ id="email"
+ name="email"
+ autocomplete="email"
+ required
+ type="email"
+ bind:value={formData.username.value}
+ errors={formData.username.errors}
/>
<Input
- label={$LL.password()}
- id="password"
- name="password"
- required
- type="password"
- bind:value={formData.password.value}
- errors={formData.password.errors}
+ label={$LL.password()}
+ id="password"
+ name="password"
+ required
+ type="password"
+ bind:value={formData.password.value}
+ errors={formData.password.errors}
/>
- <Button type="submit" text={$LL.submit()} {loading} fullWidth/>
+ <Button type="submit" text={$LL.submit()} {loading} fullWidth />
</form>
</div>
</div>
diff --git a/code/app/src/routes/(main)/(public)/sign-up/+page.ts b/code/app/src/routes/(main)/(public)/sign-up/+page.ts
new file mode 100644
index 0000000..8c86f55
--- /dev/null
+++ b/code/app/src/routes/(main)/(public)/sign-up/+page.ts
@@ -0,0 +1,11 @@
+import LL from '$i18n/i18n-svelte';
+import { get } from 'svelte/store';
+import type { PageLoad } from './$types';
+
+const l = get(LL);
+
+export const load: PageLoad = async () => {
+ return {
+ title: l.signUpPage.title(),
+ };
+}; \ No newline at end of file