feat: password recovery by e-mail, team alerts, and a price for files opened by hand
Pilot customers had no way to reset a forgotten password, and the 7 October meeting asked for two things that only needed the client's inputs to go live. Password recovery: "Esqueci minha senha" in Minha conta sends a link that works once, for an hour (/conta/redefinir#token, in the fragment so it never reaches a server or a Referer). Only the token's hash is stored, the e-mail's text is erased once sent, the answer never says whether an account exists, and a reset signs out every other session. Limited per address and source. Team alerts: Kanban users who tick "Receber alertas por e-mail" in Usuários get one when an order is paid, a cart waits for review, or a payment needs attention. Messages are queued in the transaction that caused them and sent by the worker with retries (app/mail.py). Integrações shows an E-mail row with "Enviar teste". E-mail is off in production (MAIL_ADAPTER=off; recovery keeps offering WhatsApp) until the client's SMTP account exists; then it is only settings (docs/PORTAINER.md). The local stack keeps messages in the database and log. Files opened by hand: a finished sheet in CDR, AI, PSD or TIFF (or with a length the customer typed) pays the full price plus MANUAL_FILE_EXTRA_CENTS per metre, to steer customers to PNG as the meeting asked. It is 0 until Marcus gives the amount. The Site shows it before checkout, the server charges it, Tiny gets it in the unit price, and the Kanban says it. Tested: new tests/mail_test (reset flow, SMTP delivery against a local SMTP server, retry, who gets alerts), pricing unit tests, and the browser test now checks the Site total equals the server's, run with the charge at 0 and at R$ 5,00. The full CI suite passes in a CI-style stack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -42,7 +42,18 @@
|
||||
<input id="password" type="password" autocomplete="current-password" required>
|
||||
<button class="bPri">Entrar</button>
|
||||
<button type="button" class="bLink" id="esqueci">Esqueci minha senha</button>
|
||||
<p class="nota2" id="esqueciTx" hidden>A recuperação por e-mail chega em breve. Enquanto isso, fale com a Dropstar pelo WhatsApp <a href="https://wa.me/message/NJ76CLIOUGXLB1" target="_blank" rel="noopener">16 99428-0056</a>.</p>
|
||||
</form>
|
||||
<!-- Takes the place of "Entrar" while open. -->
|
||||
<form class="bloco" id="fEsqueci" hidden>
|
||||
<h2>Esqueci minha senha</h2>
|
||||
<div id="esqueciMailBox">
|
||||
<p class="nota2">Informe o e-mail da sua conta. Enviamos um link para você criar uma nova senha.</p>
|
||||
<label for="esqueciMail">E-mail</label>
|
||||
<input id="esqueciMail" type="email" autocomplete="username" required>
|
||||
<button class="bPri" id="esqueciEnviar">Enviar link</button>
|
||||
</div>
|
||||
<p class="nota2" id="esqueciZap" hidden>Fale com a Dropstar pelo WhatsApp <a href="https://wa.me/message/NJ76CLIOUGXLB1" target="_blank" rel="noopener">16 99428-0056</a> para criar uma nova senha.</p>
|
||||
<button type="button" class="bLink" id="voltarEntrar">Voltar para entrar</button>
|
||||
</form>
|
||||
<form class="bloco" id="register">
|
||||
<h2>Criar conta</h2>
|
||||
@@ -60,6 +71,22 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- /conta/redefinir#<link do e-mail> -->
|
||||
<section class="acesso" id="redefinir" hidden aria-labelledby="tRedefinir">
|
||||
<h1 id="tRedefinir">Criar nova senha</h1>
|
||||
<div class="acessoGrid">
|
||||
<form class="bloco" id="fRedefinir">
|
||||
<h2>Nova senha</h2>
|
||||
<p class="nota2">Depois de salvar, você já entra na sua conta.</p>
|
||||
<label for="rNova">Nova senha <span class="obs">12 caracteres ou mais</span></label>
|
||||
<input id="rNova" type="password" minlength="12" maxlength="128" autocomplete="new-password" required>
|
||||
<label for="rRepete">Repita a nova senha</label>
|
||||
<input id="rRepete" type="password" minlength="12" maxlength="128" autocomplete="new-password" required>
|
||||
<button class="bPri">Salvar e entrar</button>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- /conta, /conta/pedidos, /conta/dados -->
|
||||
<div class="area" id="area" hidden>
|
||||
<nav class="lateral" aria-label="Minha conta">
|
||||
|
||||
Reference in New Issue
Block a user