</p>
<p *ngIf="!signupAllowed" i18n>
- Currently this instance doesn't allow for user registration, you may check the <a (click)="onTermsClick($event, instanceInformation)" href='#'>Terms</a> for more details or find an instance that gives you the possibility to sign up for an account and upload your videos there.
+ Currently this instance doesn't allow for user registration, you may check the <a class="link-orange" (click)="onTermsClick($event, instanceInformation)" href='#'>Terms</a> for more details or find an instance that gives you the possibility to sign up for an account and upload your videos there.
Find yours among multiple instances at: <a class="link-orange" href="https://joinpeertube.org/instances" target="_blank" rel="noopener noreferrer">https://joinpeertube.org/instances</a>.
</p>
</div>
<div class="login-form-and-externals">
<form myPluginSelector pluginSelectorId="login-form" role="form" (ngSubmit)="login()" [formGroup]="form">
- <div class="form-group">
- <div>
- <label i18n for="username">Username or email address</label>
- <input
- type="text" id="username" i18n-placeholder placeholder="Example: john@example.com" required tabindex="1"
- formControlName="username" class="form-control" [ngClass]="{ 'input-error': formErrors['username'] }" myAutofocus
- >
+ <ng-container *ngIf="!otpStep">
+ <div class="form-group">
+ <div>
+ <label i18n for="username">Username or email address</label>
+ <input
+ type="text" id="username" i18n-placeholder placeholder="Example: john@example.com" required tabindex="1"
+ formControlName="username" class="form-control" [ngClass]="{ 'input-error': formErrors['username'] }" myAutofocus
+ >
+ </div>
+
+ <div *ngIf="formErrors.username" class="form-error">{{ formErrors.username }}</div>
+
+ <div *ngIf="hasUsernameUppercase()" i18n class="form-warning">
+ ⚠️ Most email addresses do not include capital letters.
+ </div>
</div>
- <div *ngIf="formErrors.username" class="form-error">{{ formErrors.username }}</div>
+ <div class="form-group">
+ <label i18n for="password">Password</label>
- <div *ngIf="hasUsernameUppercase()" i18n class="form-warning">
- ⚠️ Most email addresses do not include capital letters.
+ <my-input-text
+ formControlName="password" inputId="password" i18n-placeholder placeholder="Password"
+ [formError]="formErrors['password']" autocomplete="current-password" [tabindex]="2"
+ ></my-input-text>
</div>
- </div>
+ </ng-container>
- <div class="form-group">
- <label i18n for="password">Password</label>
+ <div *ngIf="otpStep" class="form-group">
+ <p i18n>Enter the two-factor code generated by your phone app:</p>
- <my-input-text formControlName="password" inputId="password"
- i18n-placeholder placeholder="Password"
- [ngClass]="{ 'input-error': formErrors['password'] }"
- autocomplete="current-password" [tabindex]="2"></my-input-text>
+ <label i18n for="otp-token">Two factor authentication token</label>
- <div *ngIf="formErrors.password" class="form-error">{{ formErrors.password }}</div>
+ <my-input-text
+ #otpTokenInput
+ [show]="true" formControlName="otp-token" inputId="otp-token"
+ [formError]="formErrors['otp-token']" autocomplete="otp-token"
+ ></my-input-text>
</div>
<input type="submit" class="peertube-button orange-button" i18n-value value="Login" [disabled]="!form.valid">
- <div class="additional-links">
+ <div *ngIf="!otpStep" class="additional-links">
<a i18n role="button" class="link-orange" (click)="openForgotPasswordModal()" i18n-title title="Click here to reset your password">I forgot my password</a>
<ng-container *ngIf="signupAllowed">