diff options
author | Chocobozzz <me@florianbigard.com> | 2020-04-29 10:42:35 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-05-04 16:21:39 +0200 |
commit | ebefc902f59be6c5542c19ff706e310d9dddf75f (patch) | |
tree | 79eb831217a7938484e191070d6a465bc07a00fd /client/src/app/login/login.component.html | |
parent | 9107d791e2eef9a1b24b0499dac8b9dbba8a792f (diff) | |
download | PeerTube-ebefc902f59be6c5542c19ff706e310d9dddf75f.tar.gz PeerTube-ebefc902f59be6c5542c19ff706e310d9dddf75f.tar.zst PeerTube-ebefc902f59be6c5542c19ff706e310d9dddf75f.zip |
Add external login buttons
Diffstat (limited to 'client/src/app/login/login.component.html')
-rw-r--r-- | client/src/app/login/login.component.html | 68 |
1 files changed, 41 insertions, 27 deletions
diff --git a/client/src/app/login/login.component.html b/client/src/app/login/login.component.html index 3e53e5854..b0639d8ca 100644 --- a/client/src/app/login/login.component.html +++ b/client/src/app/login/login.component.html | |||
@@ -23,40 +23,54 @@ | |||
23 | <span *ngIf="error === 'User email is not verified.'"> <a i18n routerLink="/verify-account/ask-send-email">Request new verification email.</a></span> | 23 | <span *ngIf="error === 'User email is not verified.'"> <a i18n routerLink="/verify-account/ask-send-email">Request new verification email.</a></span> |
24 | </div> | 24 | </div> |
25 | 25 | ||
26 | <form role="form" (ngSubmit)="login()" [formGroup]="form"> | 26 | <div class="login-form-and-externals"> |
27 | <div class="form-group"> | 27 | |
28 | <div> | 28 | <form role="form" (ngSubmit)="login()" [formGroup]="form"> |
29 | <label i18n for="username">User</label> | 29 | <div class="form-group"> |
30 | <input | 30 | <div> |
31 | type="text" id="username" i18n-placeholder placeholder="Username or email address" required tabindex="1" | 31 | <label i18n for="username">User</label> |
32 | formControlName="username" class="form-control" [ngClass]="{ 'input-error': formErrors['username'] }" #emailInput | 32 | <input |
33 | > | 33 | type="text" id="username" i18n-placeholder placeholder="Username or email address" required tabindex="1" |
34 | <a i18n *ngIf="signupAllowed === true" routerLink="/signup" class="create-an-account"> | 34 | formControlName="username" class="form-control" [ngClass]="{ 'input-error': formErrors['username'] }" #usernameInput |
35 | or create an account | 35 | > |
36 | </a> | 36 | <a i18n *ngIf="signupAllowed === true" routerLink="/signup" class="create-an-account"> |
37 | or create an account | ||
38 | </a> | ||
39 | </div> | ||
40 | |||
41 | <div *ngIf="formErrors.username" class="form-error"> | ||
42 | {{ formErrors.username }} | ||
43 | </div> | ||
37 | </div> | 44 | </div> |
38 | 45 | ||
39 | <div *ngIf="formErrors.username" class="form-error"> | 46 | <div class="form-group"> |
40 | {{ formErrors.username }} | 47 | <label i18n for="password">Password</label> |
48 | <div> | ||
49 | <input | ||
50 | type="password" name="password" id="password" i18n-placeholder placeholder="Password" required tabindex="2" autocomplete="current-password" | ||
51 | formControlName="password" class="form-control" [ngClass]="{ 'input-error': formErrors['password'] }" | ||
52 | > | ||
53 | <a i18n-title class="forgot-password-button" (click)="openForgotPasswordModal()" title="Click here to reset your password">I forgot my password</a> | ||
54 | </div> | ||
55 | <div *ngIf="formErrors.password" class="form-error"> | ||
56 | {{ formErrors.password }} | ||
57 | </div> | ||
41 | </div> | 58 | </div> |
42 | </div> | ||
43 | 59 | ||
44 | <div class="form-group"> | 60 | <input type="submit" i18n-value value="Login" [disabled]="!form.valid"> |
45 | <label i18n for="password">Password</label> | 61 | </form> |
46 | <div> | 62 | |
47 | <input | 63 | <div class="external-login-blocks" *ngIf="getExternalLogins().length !== 0"> |
48 | type="password" name="password" id="password" i18n-placeholder placeholder="Password" required tabindex="2" autocomplete="current-password" | 64 | <div class="block-title" i18n>Or sign in with</div> |
49 | formControlName="password" class="form-control" [ngClass]="{ 'input-error': formErrors['password'] }" | 65 | |
50 | > | 66 | <div class="external-login-block"> |
51 | <a i18n-title class="forgot-password-button" (click)="openForgotPasswordModal()" title="Click here to reset your password">I forgot my password</a> | 67 | <a *ngFor="let auth of getExternalLogins()" [href]="getAuthHref(auth)" role="button"> |
52 | </div> | 68 | {{ auth.authDisplayName }} |
53 | <div *ngIf="formErrors.password" class="form-error"> | 69 | </a> |
54 | {{ formErrors.password }} | ||
55 | </div> | 70 | </div> |
56 | </div> | 71 | </div> |
72 | </div> | ||
57 | 73 | ||
58 | <input type="submit" i18n-value value="Login" [disabled]="!form.valid"> | ||
59 | </form> | ||
60 | </ng-container> | 74 | </ng-container> |
61 | </div> | 75 | </div> |
62 | 76 | ||