add auth
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
@if (prompt.visible()) {
|
||||
@if (sheetVisible()) {
|
||||
<div class="sheet-root">
|
||||
<button
|
||||
class="sheet-root__backdrop"
|
||||
@@ -15,7 +15,7 @@
|
||||
(click)="dismiss()"
|
||||
></button>
|
||||
|
||||
@if (auth.step() === 'email') {
|
||||
@if (step() === 'email') {
|
||||
<div class="sheet__lock" aria-hidden="true">
|
||||
<app-icon name="lock" [size]="28" />
|
||||
</div>
|
||||
@@ -31,25 +31,29 @@
|
||||
type="email"
|
||||
inputmode="email"
|
||||
autocomplete="email"
|
||||
placeholder=""
|
||||
placeholder="Почта"
|
||||
[value]="emailDraft()"
|
||||
(input)="onEmail($event)"
|
||||
/>
|
||||
</label>
|
||||
|
||||
@if (error()) {
|
||||
<p class="sheet__error" role="alert">{{ error() }}</p>
|
||||
}
|
||||
|
||||
<button
|
||||
class="sheet__submit"
|
||||
type="button"
|
||||
[disabled]="!emailValid()"
|
||||
[disabled]="!emailValid() || pending()"
|
||||
(click)="requestCode()"
|
||||
>
|
||||
Получить код
|
||||
{{ pending() ? 'Отправляем…' : 'Получить код' }}
|
||||
</button>
|
||||
<button class="sheet__ghost" type="button" (click)="dismiss()">Пока просто посмотрю</button>
|
||||
} @else {
|
||||
<h2 id="auth-sheet-title">{{ title() }}</h2>
|
||||
<p class="sheet__lead">
|
||||
Отправили 6 цифр на <b>{{ auth.email() }}</b>
|
||||
Отправили 6 цифр на <b>{{ email() }}</b>
|
||||
</p>
|
||||
|
||||
<div class="sheet__digits">
|
||||
@@ -72,14 +76,23 @@
|
||||
<button
|
||||
class="sheet__resend"
|
||||
type="button"
|
||||
[disabled]="auth.resendSeconds() > 0"
|
||||
[disabled]="resendSeconds() > 0 || pending()"
|
||||
(click)="resend()"
|
||||
>
|
||||
{{ resendLabel() }}
|
||||
</button>
|
||||
|
||||
<button class="sheet__submit" type="button" [disabled]="!codeReady()" (click)="confirm()">
|
||||
Подтвердить
|
||||
@if (error()) {
|
||||
<p class="sheet__error" role="alert">{{ error() }}</p>
|
||||
}
|
||||
|
||||
<button
|
||||
class="sheet__submit"
|
||||
type="button"
|
||||
[disabled]="!codeReady() || pending()"
|
||||
(click)="confirm()"
|
||||
>
|
||||
{{ pending() ? 'Проверяем…' : 'Подтвердить' }}
|
||||
</button>
|
||||
<button class="sheet__ghost" type="button" (click)="changeEmail()">Изменить почту</button>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user