Compare commits
No commits in common. "c27b6bda9c1aacfc8424d01db5f03b785daa93c3" and "7bdf17661171dae6abd3452b18dc8ea7dda9a358" have entirely different histories.
c27b6bda9c
...
7bdf176611
4 changed files with 95 additions and 109 deletions
|
@ -80,13 +80,14 @@
|
|||
}}
|
||||
href={item.slug}
|
||||
class={cn(
|
||||
'flex items-center justify-center gap-2 rounded-md px-3 py-3 text-sm transition-colors duration-150 lg:justify-start',
|
||||
'flex justify-center rounded-md px-3 py-3 text-sm transition-colors duration-150 lg:justify-start',
|
||||
{
|
||||
'bg-primary-700': isActive(item.slug),
|
||||
'group hover:bg-primary-700': !isActive(item.slug)
|
||||
}
|
||||
)}
|
||||
>
|
||||
<div class="flex items-center gap-2">
|
||||
<svelte:component
|
||||
this={item.icon}
|
||||
class={cn({
|
||||
|
@ -104,6 +105,7 @@
|
|||
>
|
||||
{item.name}
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
{/each}
|
||||
|
@ -116,17 +118,22 @@
|
|||
<ul class="flex flex-col gap-4">
|
||||
<li>
|
||||
<span
|
||||
class="group pointer-events-none flex items-center justify-center gap-2 rounded-md px-3 py-3 text-sm opacity-50 transition-colors duration-150 lg:justify-start"
|
||||
class="group pointer-events-none flex justify-center rounded-md px-3 py-3 text-sm opacity-50 transition-colors duration-150 lg:justify-start"
|
||||
>
|
||||
<div class="flex items-center gap-2">
|
||||
<Help class="stroke-highlight-secondary transition-colors duration-150" />
|
||||
<span
|
||||
class={cn('hidden text-highlight-secondary transition-colors duration-150 lg:block', {
|
||||
class={cn(
|
||||
'hidden text-highlight-secondary transition-colors duration-150 lg:block',
|
||||
{
|
||||
'block sm:hidden': isOpen,
|
||||
hidden: !isOpen
|
||||
})}
|
||||
}
|
||||
)}
|
||||
>
|
||||
Aide
|
||||
</span>
|
||||
</div>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -135,8 +142,9 @@
|
|||
isOpen = false;
|
||||
}}
|
||||
href="mailto:cyberbottle@peerat.dev"
|
||||
class="group flex items-center justify-center gap-2 rounded-md px-3 py-3 text-sm transition-colors duration-150 hover:bg-primary-700 lg:justify-start"
|
||||
class="group flex justify-center rounded-md px-3 py-3 text-sm transition-colors duration-150 hover:bg-primary-700 lg:justify-start"
|
||||
>
|
||||
<div class="flex items-center gap-2">
|
||||
<Mail
|
||||
class="stroke-highlight-secondary transition-colors duration-150 group-hover:stroke-primary-0"
|
||||
/>
|
||||
|
@ -151,6 +159,7 @@
|
|||
>
|
||||
Mail
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -159,10 +168,9 @@
|
|||
isOpen = false;
|
||||
}}
|
||||
href="//discord.gg/72vuHcwUkE"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
class="group flex items-center justify-center gap-2 rounded-md px-3 py-3 text-sm transition-colors duration-150 hover:bg-primary-700 lg:justify-start"
|
||||
class="group flex justify-center rounded-md px-3 py-3 text-sm transition-colors duration-150 hover:bg-primary-700 lg:justify-start"
|
||||
>
|
||||
<div class="flex items-center gap-2">
|
||||
<Discord
|
||||
class="fill-highlight-secondary transition-colors duration-150 group-hover:fill-primary-0"
|
||||
/>
|
||||
|
@ -177,6 +185,7 @@
|
|||
>
|
||||
Discord
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -185,10 +194,9 @@
|
|||
isOpen = false;
|
||||
}}
|
||||
href="//git.peerat.dev"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
class="group flex items-center justify-center gap-2 rounded-md px-3 py-3 text-sm transition-colors duration-150 hover:bg-primary-700 lg:justify-start"
|
||||
class="group flex justify-center rounded-md px-3 py-3 text-sm transition-colors duration-150 hover:bg-primary-700 lg:justify-start"
|
||||
>
|
||||
<div class="flex items-center gap-2">
|
||||
<Git
|
||||
class="stroke-highlight-secondary transition-colors duration-150 group-hover:stroke-primary-0"
|
||||
/>
|
||||
|
@ -203,6 +211,7 @@
|
|||
>
|
||||
Git
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
|
||||
export let data: PageData;
|
||||
|
||||
let submitting = false;
|
||||
|
||||
const { form, errors, enhance } = superForm(data.form, {
|
||||
onSubmit() {
|
||||
submitting = true;
|
||||
|
@ -19,6 +17,8 @@
|
|||
submitting = false;
|
||||
}
|
||||
});
|
||||
|
||||
let submitting = false;
|
||||
</script>
|
||||
|
||||
<div class="flex h-screen w-full">
|
||||
|
@ -27,14 +27,7 @@
|
|||
<h1 class="mx-auto text-xl font-bold">Connexion</h1>
|
||||
<form class="flex flex-col justify-center gap-2" method="POST" use:enhance>
|
||||
<label for="pseudo"> Nom d'utilisateur </label>
|
||||
<Input
|
||||
name="pseudo"
|
||||
placeholder="Barlow"
|
||||
type="text"
|
||||
required
|
||||
bind:value={$form.pseudo}
|
||||
aria-invalid={$errors.pseudo ? 'true' : undefined}
|
||||
/>
|
||||
<Input name="pseudo" placeholder="Barlow" type="text" required bind:value={$form.pseudo} />
|
||||
{#if $errors.pseudo}<span class="text-sm text-red-500">{$errors.pseudo}</span>{/if}
|
||||
|
||||
<label for="passwd"> Mot de passe </label>
|
||||
|
@ -44,7 +37,6 @@
|
|||
type="password"
|
||||
required
|
||||
bind:value={$form.passwd}
|
||||
aria-invalid={$errors.passwd ? 'true' : undefined}
|
||||
/>
|
||||
{#if $errors.passwd}<span class="text-sm text-red-500">{$errors.passwd}</span>{/if}
|
||||
|
||||
|
|
|
@ -84,10 +84,9 @@ export const actions = {
|
|||
}
|
||||
|
||||
if (res.status === 400) {
|
||||
const { email_valid, username_valid } = await res.json();
|
||||
const { email_valid } = await res.json();
|
||||
|
||||
if (!email_valid) form.errors.email = ['Un compte avec cette adresse email existe déjà'];
|
||||
if (!username_valid) form.errors.pseudo = ['Ce pseudo est déjà utilisé'];
|
||||
|
||||
return fail(400, { form });
|
||||
}
|
||||
|
|
|
@ -10,9 +10,6 @@
|
|||
|
||||
export let data: PageData;
|
||||
|
||||
let submitting = false;
|
||||
let confirmation = false;
|
||||
|
||||
const { form, errors, enhance } = superForm(data.form, {
|
||||
onSubmit() {
|
||||
submitting = true;
|
||||
|
@ -31,6 +28,9 @@
|
|||
}
|
||||
});
|
||||
|
||||
let submitting = false;
|
||||
let confirmation = false;
|
||||
|
||||
export const snapshot: Snapshot = {
|
||||
capture: () => confirmation,
|
||||
restore: (value) => (confirmation = value)
|
||||
|
@ -57,7 +57,6 @@
|
|||
placeholder="philipzcwbarlow@peerat.dev"
|
||||
autocomplete="off"
|
||||
required
|
||||
aria-invalid={$errors.email ? 'true' : undefined}
|
||||
/>
|
||||
{#if $errors.email}<span class="text-sm text-red-500">{$errors.email}</span>{/if}
|
||||
|
||||
|
@ -69,7 +68,6 @@
|
|||
placeholder="Philip"
|
||||
autocomplete="off"
|
||||
required
|
||||
aria-invalid={$errors.firstname ? 'true' : undefined}
|
||||
/>
|
||||
{#if $errors.firstname}<span class="text-sm text-red-500">{$errors.firstname}</span>{/if}
|
||||
|
||||
|
@ -81,7 +79,6 @@
|
|||
placeholder="Barlow"
|
||||
autocomplete="off"
|
||||
required
|
||||
aria-invalid={$errors.lastname ? 'true' : undefined}
|
||||
/>
|
||||
{#if $errors.lastname}<span class="text-sm text-red-500">{$errors.lastname}</span>{/if}
|
||||
|
||||
|
@ -93,7 +90,6 @@
|
|||
placeholder="Cypher Wolf"
|
||||
autocomplete="off"
|
||||
required
|
||||
aria-invalid={$errors.pseudo ? 'true' : undefined}
|
||||
/>
|
||||
{#if $errors.pseudo}<span class="text-sm text-red-500">{$errors.pseudo}</span>{/if}
|
||||
|
||||
|
@ -105,21 +101,11 @@
|
|||
}}
|
||||
>
|
||||
<label for="passwd"> Mot de passe </label>
|
||||
<Input
|
||||
name="passwd"
|
||||
placeholder="************"
|
||||
type="password"
|
||||
aria-invalid={$errors.passwd ? 'true' : undefined}
|
||||
/>
|
||||
<Input name="passwd" placeholder="************" type="password" />
|
||||
{#if $errors.passwd}<span class="text-sm text-red-500">{$errors.passwd}</span>{/if}
|
||||
|
||||
<label for="code"> Code </label>
|
||||
<Input
|
||||
name="code"
|
||||
placeholder="1234"
|
||||
type="text"
|
||||
aria-invalid={$errors.code ? 'true' : undefined}
|
||||
/>
|
||||
<Input name="code" placeholder="1234" type="text" />
|
||||
{#if $errors.code}<span class="text-sm text-red-500">{$errors.code}</span>{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
|
Loading…
Add table
Reference in a new issue