misc: did somes changes
This commit is contained in:
parent
027628290f
commit
f8f460fe74
8 changed files with 9 additions and 27 deletions
|
@ -25,7 +25,7 @@ export const handle: Handle = async ({ event, resolve }) => {
|
|||
}
|
||||
|
||||
try {
|
||||
const user: User = await res.json();
|
||||
const user = await res.json() as User;
|
||||
event.locals.user = user;
|
||||
} catch (error) {
|
||||
event.locals.user = undefined;
|
||||
|
|
0
src/lib/components/icons/index.ts
Normal file
0
src/lib/components/icons/index.ts
Normal file
|
@ -1,17 +0,0 @@
|
|||
import { browser } from '$app/environment';
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
const defaultValue = true;
|
||||
const initialValue = browser
|
||||
? window.localStorage.getItem('plausible_ignore') === 'true'
|
||||
: defaultValue;
|
||||
|
||||
const plausible = writable<boolean>(initialValue);
|
||||
|
||||
plausible.subscribe((value) => {
|
||||
if (browser) {
|
||||
window.localStorage.setItem('plausible_ignore', value ? 'true' : 'false');
|
||||
}
|
||||
});
|
||||
|
||||
export default plausible;
|
|
@ -54,6 +54,7 @@
|
|||
<Form.Control let:attrs>
|
||||
<Form.Label>Prénom</Form.Label>
|
||||
<Input {...attrs} bind:value={$formData.firstname} placeholder="Philip" />
|
||||
<Form.Description>Votre prénom de famille ne sera pas visible par les autres utilisateurs.</Form.Description>
|
||||
</Form.Control>
|
||||
<Form.FieldErrors />
|
||||
</Form.Field>
|
||||
|
@ -61,6 +62,7 @@
|
|||
<Form.Control let:attrs>
|
||||
<Form.Label>Nom de famille</Form.Label>
|
||||
<Input {...attrs} bind:value={$formData.lastname} placeholder="Barlow" />
|
||||
<Form.Description>Votre nom de famille ne sera pas visible par les autres utilisateurs.</Form.Description>
|
||||
</Form.Control>
|
||||
<Form.FieldErrors />
|
||||
</Form.Field>
|
||||
|
@ -69,7 +71,7 @@
|
|||
<Form.Label>Nom d'utilisateur</Form.Label>
|
||||
<Input {...attrs} bind:value={$formData.pseudo} placeholder="Cypherwolf" />
|
||||
</Form.Control>
|
||||
<Form.Description>Ce nom sera visible par les autres utilisateurs.</Form.Description>
|
||||
<Form.Description>Votre nom d'utilisateur sera visible par les autres utilisateurs.</Form.Description>
|
||||
<Form.FieldErrors />
|
||||
</Form.Field>
|
||||
</form>
|
||||
|
|
|
@ -21,7 +21,6 @@ export const load: PageServerLoad = async ({ locals: { user } }) => {
|
|||
|
||||
export const actions: Actions = {
|
||||
default: async ({ request, cookies, fetch, url: { searchParams } }) => {
|
||||
|
||||
const form = await superValidate(request, zod(loginSchema));
|
||||
|
||||
if (!form.valid) {
|
||||
|
|
|
@ -25,7 +25,6 @@ export const load: PageServerLoad = async ({ locals: { user } }) => {
|
|||
|
||||
export const actions: Actions = {
|
||||
register: async ({ request }) => {
|
||||
|
||||
const form = await superValidate(request, zod(registerSchema));
|
||||
|
||||
if (!form.valid) {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
import { superForm } from 'sveltekit-superforms/client';
|
||||
|
||||
import * as Form from '$lib/components/ui/form';
|
||||
import Input from '$lib/components/ui/input/input.svelte';
|
||||
import { Input } from '$lib/components/ui/input';
|
||||
|
||||
import { registerConfirmationSchema, registerSchema } from '$lib/validations/auth';
|
||||
|
||||
|
@ -155,7 +155,7 @@
|
|||
<Input
|
||||
{...attrs}
|
||||
bind:value={$registerConfirmationFormData.code}
|
||||
placeholder="0000"
|
||||
placeholder="0a0a-a0a0"
|
||||
/>
|
||||
</Form.Control>
|
||||
<Form.FieldErrors />
|
||||
|
@ -220,9 +220,9 @@
|
|||
{/if}
|
||||
<ul class="flex justify-between">
|
||||
<li>
|
||||
<a class="text-muted-foreground hover:text-primary" href="/login{$page.url.search}"
|
||||
>Se connecter</a
|
||||
>
|
||||
<a class="text-muted-foreground hover:text-primary" href="/login{$page.url.search}">
|
||||
Se connecter
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
import '../app.css';
|
||||
|
||||
import { Metadata } from '$lib/components';
|
||||
|
||||
</script>
|
||||
|
||||
<Metadata />
|
||||
|
|
Loading…
Add table
Reference in a new issue