]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+login/login.component.html
Fix viewers for lives
[github/Chocobozzz/PeerTube.git] / client / src / app / +login / login.component.html
CommitLineData
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>
f8b530e0
RK
53 <my-input-toggle-hidden formControlName="password" id="password"
54 i18n-placeholder placeholder="Password"
55 [ngClass]="{ 'input-error': formErrors['password'] }"
56 autocomplete="current-password"></my-input-toggle-hidden>
ebefc902
C
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
ab0beac7
K
94 <div *ngIf="!isEmailDisabled()" class="forgot-password-instructions" i18n>
95 Enter your email address and we will send you a link to reset your password.
96 </div>
97
3b3b1820 98 <div class="form-group" [hidden]="isEmailDisabled()">
63347a0f
C
99 <label i18n for="forgot-password-email">Email</label>
100 <input
101 type="email" id="forgot-password-email" i18n-placeholder placeholder="Email address" required
102 [(ngModel)]="forgotPasswordEmail" #forgotPasswordEmailInput
103 >
104 </div>
105 </div>
ecb4e35f 106
63347a0f 107 <div class="modal-footer inputs">
a6d5ff76
RK
108 <input
109 type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel"
110 (click)="hideForgotPasswordModal()" (key.enter)="hideForgotPasswordModal()"
111 >
ecb4e35f 112
63347a0f 113 <input
ab0beac7 114 type="submit" i18n-value="Password reset button" value="Reset" class="action-button-submit"
63347a0f
C
115 (click)="askResetPassword()" [disabled]="!forgotPasswordEmailInput.validity.valid"
116 >
ecb4e35f 117 </div>
63347a0f 118</ng-template>