119 lines
4.7 KiB
HTML
119 lines
4.7 KiB
HTML
<div class="margin-content">
|
|
<div i18n class="title-page title-page-single">
|
|
Login
|
|
</div>
|
|
|
|
<div class="alert alert-danger" i18n *ngIf="externalAuthError">
|
|
Sorry but there was an issue with the external login process. Please <a routerLink="/about">contact an administrator</a>.
|
|
</div>
|
|
|
|
<ng-container *ngIf="!externalAuthError && !isAuthenticatedWithExternalAuth">
|
|
<div class="looking-for-account alert alert-info" *ngIf="signupAllowed === false" role="alert">
|
|
<h6 class="alert-heading" i18n>
|
|
If you are looking for an account…
|
|
</h6>
|
|
|
|
<div i18n>
|
|
Currently this instance doesn't allow for user registration, but you can find an instance
|
|
that gives you the possibility to sign up for an account and upload your videos there.
|
|
|
|
<br />
|
|
|
|
Find yours among multiple instances at <a class="alert-link" href="https://joinpeertube.org/instances" target="_blank" rel="noopener noreferrer">https://joinpeertube.org/instances</a>.
|
|
</div>
|
|
</div>
|
|
|
|
<div *ngIf="error" class="alert alert-danger">{{ error }}
|
|
<span *ngIf="error === 'User email is not verified.'"> <a i18n routerLink="/verify-account/ask-send-email">Request new verification email.</a></span>
|
|
</div>
|
|
|
|
<div class="login-form-and-externals">
|
|
|
|
<form role="form" (ngSubmit)="login()" [formGroup]="form">
|
|
<div class="form-group">
|
|
<div>
|
|
<label i18n for="username">User</label>
|
|
<input
|
|
type="text" id="username" i18n-placeholder placeholder="Username or email address" required tabindex="1"
|
|
formControlName="username" class="form-control" [ngClass]="{ 'input-error': formErrors['username'] }" #usernameInput
|
|
>
|
|
<a i18n *ngIf="signupAllowed === true" routerLink="/signup" class="create-an-account">
|
|
or create an account
|
|
</a>
|
|
</div>
|
|
|
|
<div *ngIf="formErrors.username" class="form-error">
|
|
{{ formErrors.username }}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label i18n for="password">Password</label>
|
|
<div>
|
|
<my-input-toggle-hidden formControlName="password" id="password"
|
|
i18n-placeholder placeholder="Password"
|
|
[ngClass]="{ 'input-error': formErrors['password'] }"
|
|
autocomplete="current-password"></my-input-toggle-hidden>
|
|
<a i18n-title class="forgot-password-button" (click)="openForgotPasswordModal()" title="Click here to reset your password">I forgot my password</a>
|
|
</div>
|
|
<div *ngIf="formErrors.password" class="form-error">
|
|
{{ formErrors.password }}
|
|
</div>
|
|
</div>
|
|
|
|
<input type="submit" i18n-value value="Login" [disabled]="!form.valid">
|
|
</form>
|
|
|
|
<div class="external-login-blocks" *ngIf="getExternalLogins().length !== 0">
|
|
<div class="block-title" i18n>Or sign in with</div>
|
|
|
|
<div>
|
|
<a class="external-login-block" *ngFor="let auth of getExternalLogins()" [href]="getAuthHref(auth)" role="button">
|
|
{{ auth.authDisplayName }}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</ng-container>
|
|
</div>
|
|
|
|
<ng-template #forgotPasswordModal>
|
|
<div class="modal-header">
|
|
<h4 i18n class="modal-title">Forgot your password</h4>
|
|
|
|
<my-global-icon iconName="cross" aria-label="Close" role="button" (click)="hideForgotPasswordModal()"></my-global-icon>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<div *ngIf="isEmailDisabled()" class="alert alert-danger" i18n>
|
|
We are sorry, you cannot recover your password because your instance administrator did not configure the PeerTube email system.
|
|
</div>
|
|
|
|
<div *ngIf="!isEmailDisabled()" class="forgot-password-instructions" i18n>
|
|
Enter your email address and we will send you a link to reset your password.
|
|
</div>
|
|
|
|
<div class="form-group" [hidden]="isEmailDisabled()">
|
|
<label i18n for="forgot-password-email">Email</label>
|
|
<input
|
|
type="email" id="forgot-password-email" i18n-placeholder placeholder="Email address" required
|
|
[(ngModel)]="forgotPasswordEmail" #forgotPasswordEmailInput
|
|
>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer inputs">
|
|
<input
|
|
type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel"
|
|
(click)="hideForgotPasswordModal()" (key.enter)="hideForgotPasswordModal()"
|
|
>
|
|
|
|
<input
|
|
type="submit" i18n-value="Password reset button" value="Reset" class="action-button-submit"
|
|
(click)="askResetPassword()" [disabled]="!forgotPasswordEmailInput.validity.valid"
|
|
>
|
|
</div>
|
|
</ng-template>
|