feat: бронирование товаров и сброс пароля по email

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
shop
2026-05-17 11:38:52 +03:00
parent bda73e1662
commit ade031b0e7
22 changed files with 666 additions and 3 deletions
+18
View File
@@ -0,0 +1,18 @@
<%- include('../partials/layout-start') %>
<div class="auth">
<form action="/forgot-password" method="post" class="form card">
<h1>Сброс пароля</h1>
<% if (error) { %><p class="alert alert--error"><%= error %></p><% } %>
<% if (success) { %><p class="alert alert--success"><%= success %></p><% } %>
<p class="muted">Укажите email аккаунта — отправим ссылку для нового пароля.</p>
<label class="label">
Email
<input type="email" name="email" class="input" required value="<%= values.email || '' %>" autocomplete="email">
</label>
<button type="submit" class="btn btn--primary btn--block">Отправить ссылку</button>
<p class="form-footer"><a href="/login">← Вход</a></p>
</form>
</div>
<%- include('../partials/layout-end') %>
+11
View File
@@ -0,0 +1,11 @@
<%- include('../partials/layout-start') %>
<div class="auth">
<div class="card form">
<h1>Пароль изменён</h1>
<p class="alert alert--success">Теперь можно войти с новым паролем.</p>
<a href="/login" class="btn btn--primary btn--block">Войти</a>
</div>
</div>
<%- include('../partials/layout-end') %>
+28
View File
@@ -0,0 +1,28 @@
<%- include('../partials/layout-start') %>
<div class="auth">
<% if (token) { %>
<form action="/reset-password" method="post" class="form card">
<h1>Новый пароль</h1>
<% if (error) { %><p class="alert alert--error"><%= error %></p><% } %>
<input type="hidden" name="token" value="<%= token %>">
<label class="label">
Новый пароль
<input type="password" name="password" class="input" required minlength="6" autocomplete="new-password">
</label>
<label class="label">
Повторите пароль
<input type="password" name="password2" class="input" required minlength="6" autocomplete="new-password">
</label>
<button type="submit" class="btn btn--primary btn--block">Сохранить пароль</button>
</form>
<% } else { %>
<div class="card form">
<h1>Ссылка недействительна</h1>
<% if (error) { %><p class="alert alert--error"><%= error %></p><% } %>
<a href="/forgot-password" class="btn btn--primary">Запросить снова</a>
</div>
<% } %>
</div>
<%- include('../partials/layout-end') %>