]>
Commit | Line | Data |
---|---|---|
d235f6b0 | 1 | <div class="margin-content"> |
b1d40cff | 2 | <div i18n class="title-page title-page-single"> |
d235f6b0 C |
3 | Login |
4 | </div> | |
192ea60b | 5 | |
bc90883f C |
6 | <div class="alert alert-danger" i18n *ngIf="externalAuthError"> |
7 | Sorry but there was an issue with the external login process. Please <a routerLink="/about">contact an administrator</a>. | |
8 | </div> | |
9 | ||
10 | <ng-container *ngIf="!externalAuthError && !isAuthenticatedWithExternalAuth"> | |
f375bb3d | 11 | <div class="looking-for-account alert alert-info" *ngIf="signupAllowed === false" role="alert"> |
4a8d113b C |
12 | <h6 class="alert-heading" i18n> |
13 | If you are looking for an account… | |
14 | </h6> | |
21e6dc81 | 15 | |
4a8d113b C |
16 | <div i18n> |
17 | Currently this instance doesn't allow for user registration, but you can find an instance | |
18 | that gives you the possibility to sign up for an account and upload your videos there. | |
21e6dc81 | 19 | |
4a8d113b | 20 | <br /> |
21e6dc81 | 21 | |
4a8d113b C |
22 | 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>. |
23 | </div> | |
000eb0e4 | 24 | </div> |
000eb0e4 | 25 | |
4a8d113b C |
26 | <div *ngIf="error" class="alert alert-danger">{{ error }} |
27 | <span *ngIf="error === 'User email is not verified.'"> <a i18n routerLink="/verify-account/ask-send-email">Request new verification email.</a></span> | |
28 | </div> | |
b1794c53 | 29 | |
ebefc902 C |
30 | <div class="login-form-and-externals"> |
31 | ||
32 | <form role="form" (ngSubmit)="login()" [formGroup]="form"> | |
33 | <div class="form-group"> | |
34 | <div> | |
35 | <label i18n for="username">User</label> | |
36 | <input | |
37 | type="text" id="username" i18n-placeholder placeholder="Username or email address" required tabindex="1" | |
38 | formControlName="username" class="form-control" [ngClass]="{ 'input-error': formErrors['username'] }" #usernameInput | |
39 | > | |
40 | <a i18n *ngIf="signupAllowed === true" routerLink="/signup" class="create-an-account"> | |
41 | or create an account | |
42 | </a> | |
43 | </div> | |
2b084d70 | 44 | |
ebefc902 C |
45 | <div *ngIf="formErrors.username" class="form-error"> |
46 | {{ formErrors.username }} | |
47 | </div> | |
4a8d113b | 48 | </div> |
b1794c53 | 49 | |
ebefc902 C |
50 | <div class="form-group"> |
51 | <label i18n for="password">Password</label> | |
52 | <div> | |
53 | <input | |
54 | type="password" name="password" id="password" i18n-placeholder placeholder="Password" required tabindex="2" autocomplete="current-password" | |
55 | formControlName="password" class="form-control" [ngClass]="{ 'input-error': formErrors['password'] }" | |
56 | > | |
57 | <a i18n-title class="forgot-password-button" (click)="openForgotPasswordModal()" title="Click here to reset your password">I forgot my password</a> | |
58 | </div> | |
59 | <div *ngIf="formErrors.password" class="form-error"> | |
60 | {{ formErrors.password }} | |
61 | </div> | |
4a8d113b | 62 | </div> |
ebefc902 C |
63 | |
64 | <input type="submit" i18n-value value="Login" [disabled]="!form.valid"> | |
65 | </form> | |
66 | ||
67 | <div class="external-login-blocks" *ngIf="getExternalLogins().length !== 0"> | |
68 | <div class="block-title" i18n>Or sign in with</div> | |
69 | ||
bc90883f C |
70 | <div> |
71 | <a class="external-login-block" *ngFor="let auth of getExternalLogins()" [href]="getAuthHref(auth)" role="button"> | |
ebefc902 C |
72 | {{ auth.authDisplayName }} |
73 | </a> | |
4a8d113b | 74 | </div> |
ecb4e35f | 75 | </div> |
ebefc902 | 76 | </div> |
897ec54d | 77 | |
4a8d113b | 78 | </ng-container> |
897ec54d | 79 | </div> |
ecb4e35f | 80 | |
63347a0f C |
81 | <ng-template #forgotPasswordModal> |
82 | <div class="modal-header"> | |
83 | <h4 i18n class="modal-title">Forgot your password</h4> | |
457bb213 C |
84 | |
85 | <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="hideForgotPasswordModal()"></my-global-icon> | |
63347a0f | 86 | </div> |
ecb4e35f | 87 | |
63347a0f | 88 | <div class="modal-body"> |
3b3b1820 C |
89 | |
90 | <div *ngIf="isEmailDisabled()" class="alert alert-danger" i18n> | |
32d7f2b7 | 91 | We are sorry, you cannot recover your password because your instance administrator did not configure the PeerTube email system. |
3b3b1820 C |
92 | </div> |
93 | ||
94 | <div class="form-group" [hidden]="isEmailDisabled()"> | |
63347a0f C |
95 | <label i18n for="forgot-password-email">Email</label> |
96 | <input | |
97 | type="email" id="forgot-password-email" i18n-placeholder placeholder="Email address" required | |
98 | [(ngModel)]="forgotPasswordEmail" #forgotPasswordEmailInput | |
99 | > | |
100 | </div> | |
101 | </div> | |
ecb4e35f | 102 | |
63347a0f | 103 | <div class="modal-footer inputs"> |
a6d5ff76 RK |
104 | <input |
105 | type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel" | |
106 | (click)="hideForgotPasswordModal()" (key.enter)="hideForgotPasswordModal()" | |
107 | > | |
ecb4e35f | 108 | |
63347a0f C |
109 | <input |
110 | type="submit" i18n-value value="Send me an email to reset my password" class="action-button-submit" | |
111 | (click)="askResetPassword()" [disabled]="!forgotPasswordEmailInput.validity.valid" | |
112 | > | |
ecb4e35f | 113 | </div> |
63347a0f | 114 | </ng-template> |