МеÐлкие улучшения
This commit is contained in:
parent
70e75dc11b
commit
0678c81284
2 changed files with 31 additions and 39 deletions
|
|
@ -7,10 +7,6 @@ import { SITE_URL } from '@constants';
|
||||||
title="Вход в аккаунт"
|
title="Вход в аккаунт"
|
||||||
description="Войдите в свой аккаунт для доступа к личному кабинету"
|
description="Войдите в свой аккаунт для доступа к личному кабинету"
|
||||||
canonicalLink={`${SITE_URL}/auth/sign-in`}
|
canonicalLink={`${SITE_URL}/auth/sign-in`}
|
||||||
breadcrumbs={[
|
|
||||||
{ label: 'Главная', href: '/' },
|
|
||||||
{ label: 'Вход' }
|
|
||||||
]}
|
|
||||||
>
|
>
|
||||||
<div class="auth-page">
|
<div class="auth-page">
|
||||||
<div class="auth-container">
|
<div class="auth-container">
|
||||||
|
|
@ -59,7 +55,7 @@ import { SITE_URL } from '@constants';
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div class="auth-footer">
|
<div class="auth-footer">
|
||||||
<p>Нет аккаунта? <a href="/auth/sig-up">Зарегистрироваться</a></p>
|
<p>Нет аккаунта? <a href="/auth/sign-up">Зарегистрироваться</a></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -74,7 +70,7 @@ import { SITE_URL } from '@constants';
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 8rem 2rem 2rem;
|
padding: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.auth-container {
|
.auth-container {
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,7 @@ import { SITE_URL } from '@constants';
|
||||||
<Layout
|
<Layout
|
||||||
title="Регистрация"
|
title="Регистрация"
|
||||||
description="Создайте аккаунт для доступа к личному кабинету"
|
description="Создайте аккаунт для доступа к личному кабинету"
|
||||||
canonicalLink={`${SITE_URL}/auth/sig-up`}
|
canonicalLink={`${SITE_URL}/auth/sign-up`}
|
||||||
breadcrumbs={[
|
|
||||||
{ label: 'Главная', href: '/' },
|
|
||||||
{ label: 'Регистрация' }
|
|
||||||
]}
|
|
||||||
>
|
>
|
||||||
<div class="auth-page">
|
<div class="auth-page">
|
||||||
<div class="auth-container">
|
<div class="auth-container">
|
||||||
|
|
@ -23,48 +19,48 @@ import { SITE_URL } from '@constants';
|
||||||
<form class="auth-form" id="sign-up-form">
|
<form class="auth-form" id="sign-up-form">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="name">ФИО</label>
|
<label for="name">ФИО</label>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
id="name"
|
id="name"
|
||||||
name="name"
|
name="name"
|
||||||
placeholder="Иванов Иван Иванович"
|
placeholder="Иванов Иван Иванович"
|
||||||
required
|
required
|
||||||
autocomplete="name"
|
autocomplete="name"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="email">Email</label>
|
<label for="email">Email</label>
|
||||||
<input
|
<input
|
||||||
type="email"
|
type="email"
|
||||||
id="email"
|
id="email"
|
||||||
name="email"
|
name="email"
|
||||||
placeholder="example@mail.ru"
|
placeholder="example@mail.ru"
|
||||||
required
|
required
|
||||||
autocomplete="email"
|
autocomplete="email"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="phone">Телефон</label>
|
<label for="phone">Телефон</label>
|
||||||
<input
|
<input
|
||||||
type="tel"
|
type="tel"
|
||||||
id="phone"
|
id="phone"
|
||||||
name="phone"
|
name="phone"
|
||||||
placeholder="+7 (999) 000-00-00"
|
placeholder="+7 (999) 000-00-00"
|
||||||
required
|
required
|
||||||
autocomplete="tel"
|
autocomplete="tel"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="password">Пароль</label>
|
<label for="password">Пароль</label>
|
||||||
<input
|
<input
|
||||||
type="password"
|
type="password"
|
||||||
id="password"
|
id="password"
|
||||||
name="password"
|
name="password"
|
||||||
placeholder="••••••••"
|
placeholder="••••••••"
|
||||||
required
|
required
|
||||||
autocomplete="new-password"
|
autocomplete="new-password"
|
||||||
minlength="6"
|
minlength="6"
|
||||||
/>
|
/>
|
||||||
|
|
@ -72,12 +68,12 @@ import { SITE_URL } from '@constants';
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="confirmPassword">Подтвердите пароль</label>
|
<label for="confirmPassword">Подтвердите пароль</label>
|
||||||
<input
|
<input
|
||||||
type="password"
|
type="password"
|
||||||
id="confirmPassword"
|
id="confirmPassword"
|
||||||
name="confirmPassword"
|
name="confirmPassword"
|
||||||
placeholder="••••••••"
|
placeholder="••••••••"
|
||||||
required
|
required
|
||||||
autocomplete="new-password"
|
autocomplete="new-password"
|
||||||
minlength="6"
|
minlength="6"
|
||||||
/>
|
/>
|
||||||
|
|
@ -281,10 +277,10 @@ import { SITE_URL } from '@constants';
|
||||||
// Обработка отправки формы
|
// Обработка отправки формы
|
||||||
document.getElementById('sign-up-form')?.addEventListener('submit', async (e) => {
|
document.getElementById('sign-up-form')?.addEventListener('submit', async (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
const form = e.target as HTMLFormElement;
|
const form = e.target as HTMLFormElement;
|
||||||
const formData = new FormData(form);
|
const formData = new FormData(form);
|
||||||
|
|
||||||
const name = formData.get('name') as string;
|
const name = formData.get('name') as string;
|
||||||
const email = formData.get('email') as string;
|
const email = formData.get('email') as string;
|
||||||
const phone = formData.get('phone') as string;
|
const phone = formData.get('phone') as string;
|
||||||
|
|
@ -299,7 +295,7 @@ import { SITE_URL } from '@constants';
|
||||||
|
|
||||||
// Здесь будет логика отправки на сервер
|
// Здесь будет логика отправки на сервер
|
||||||
console.log('Регистрация:', { name, email, phone, password });
|
console.log('Регистрация:', { name, email, phone, password });
|
||||||
|
|
||||||
// Пример: await fetch('/api/auth/signup', { method: 'POST', body: JSON.stringify({ name, email, phone, password }) });
|
// Пример: await fetch('/api/auth/signup', { method: 'POST', body: JSON.stringify({ name, email, phone, password }) });
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue