]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+login/login.component.html
Fix terms/code of conduct link toggle
[github/Chocobozzz/PeerTube.git] / client / src / app / +login / login.component.html
CommitLineData
11056966
C
1<h1 i18n class="title-page-v2">
2 <strong class="underline-orange">{{ instanceName }}</strong>
3 >
4 Login
5</h1>
192ea60b 6
11056966 7<div class="margin-content">
bc90883f 8 <ng-container *ngIf="!externalAuthError && !isAuthenticatedWithExternalAuth">
11056966
C
9
10 <div class="alert pt-alert-primary" role="alert">
11 <h5 class="alert-heading" i18n>
12 Logging into an account lets you publish content
13 </h5>
14
15 <p *ngIf="signupAllowed" i18n>
4e082e78 16 This instance allows registration. However, be careful to check the <a class="link-orange terms-anchor d-inline" (click)="onTermsClick($event, instanceInformation)" href='#'>Terms</a><a class="terms-link" target="_blank" routerLink="/about/instance" fragment="terms">Terms</a> before creating an account.
11056966
C
17 You may also search for another instance to match your exact needs at: <a class="link-orange" href="https://joinpeertube.org/instances" target="_blank" rel="noopener noreferrer">https://joinpeertube.org/instances</a>.
18 </p>
19
20 <p *ngIf="!signupAllowed" i18n>
6e391224 21 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.
11056966
C
22 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>.
23 </p>
4a8d113b 24 </div>
b1794c53 25
c4a05171
C
26 <div class="alert alert-danger" i18n *ngIf="externalAuthError">
27 Sorry but there was an issue with the external login process. Please <a class="link-orange" routerLink="/about">contact an administrator</a>.
28 </div>
29
30 <div *ngIf="error" class="alert alert-danger">
31 {{ error }}
32
33 <a *ngIf="error === 'User email is not verified.'" class="ms-1 link-orange" i18n routerLink="/verify-account/ask-send-email">
34 Request new verification email
35 </a>
36 </div>
37
40360c17
K
38 <div class="wrapper">
39 <div class="login-form-and-externals">
40
4e082e78 41 <form class="w-100 m-0" myPluginSelector pluginSelectorId="login-form" role="form" (ngSubmit)="login()" [formGroup]="form">
d12b40fb
C
42 <ng-container *ngIf="!otpStep">
43 <div class="form-group">
44 <div>
45 <label i18n for="username">Username or email address</label>
46 <input
47 type="text" id="username" i18n-placeholder placeholder="Example: john@example.com" required tabindex="1"
48 formControlName="username" class="form-control" [ngClass]="{ 'input-error': formErrors['username'] }" myAutofocus
49 >
50 </div>
51
52 <div *ngIf="formErrors.username" class="form-error">{{ formErrors.username }}</div>
53
54 <div *ngIf="hasUsernameUppercase()" i18n class="form-warning">
55 ⚠️ Most email addresses do not include capital letters.
56 </div>
40360c17
K
57 </div>
58
d12b40fb
C
59 <div class="form-group">
60 <label i18n for="password">Password</label>
7f28f2dd 61
d12b40fb
C
62 <my-input-text
63 formControlName="password" inputId="password" i18n-placeholder placeholder="Password"
64 [formError]="formErrors['password']" autocomplete="current-password" [tabindex]="2"
65 ></my-input-text>
7f28f2dd 66 </div>
d12b40fb
C
67 </ng-container>
68
69 <div *ngIf="otpStep" class="form-group">
70 <p i18n>Enter the two-factor code generated by your phone app:</p>
2b084d70 71
d12b40fb 72 <label i18n for="otp-token">Two factor authentication token</label>
11056966 73
75084782 74 <my-input-text
d12b40fb
C
75 #otpTokenInput
76 [show]="true" formControlName="otp-token" inputId="otp-token"
77 [formError]="formErrors['otp-token']" autocomplete="otp-token"
75084782 78 ></my-input-text>
ebefc902 79 </div>
40360c17 80
4e082e78 81 <input type="submit" class="peertube-button orange-button w-100" i18n-value value="Login" [disabled]="!form.valid">
1916c966 82
4e082e78 83 <div *ngIf="!otpStep" class="additional-links d-flex justify-content-center mt-4 mb-5">
d0fbc9fd
C
84 <button i18n class="button-unstyle link-orange mx-3" (click)="openForgotPasswordModal()" i18n-title title="Click here to reset your password">
85 I forgot my password
86 </button>
8406a9e8 87
11056966 88 <ng-container *ngIf="signupAllowed">
d0fbc9fd 89 <span class="lh-1">·</span>
4e082e78 90 <a i18n routerLink="/signup" class="link-orange mx-3">Create an account</a>
11056966 91 </ng-container>
40360c17
K
92 </div>
93 </form>
ebefc902 94
40360c17 95 <div class="external-login-blocks" *ngIf="getExternalLogins().length !== 0">
4e082e78 96 <div class="fw-semibold" i18n>Or sign in with</div>
ebefc902 97
40360c17
K
98 <div>
99 <a class="external-login-block" *ngFor="let auth of getExternalLogins()" [href]="getAuthHref(auth)" role="button">
100 {{ auth.authDisplayName }}
101 </a>
102 </div>
4a8d113b 103 </div>
ecb4e35f 104 </div>
897ec54d 105
40360c17 106 <div #instanceInformation class="instance-information">
071f3e51 107 <my-instance-about-accordion
ed22eaab 108 #instanceAboutAccordion
11056966 109 [displayInstanceName]="false"
071f3e51
C
110 (init)="onInstanceAboutAccordionInit($event)" [panels]="instanceInformationPanels"
111 pluginScope="login" pluginHook="filter:login.instance-about-plugin-panels.create.result"
112 ></my-instance-about-accordion>
40360c17
K
113 </div>
114 </div>
4a8d113b 115 </ng-container>
897ec54d 116</div>
ecb4e35f 117
63347a0f
C
118<ng-template #forgotPasswordModal>
119 <div class="modal-header">
120 <h4 i18n class="modal-title">Forgot your password</h4>
457bb213
C
121
122 <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="hideForgotPasswordModal()"></my-global-icon>
63347a0f 123 </div>
ecb4e35f 124
4e082e78 125 <div class="modal-body text-start">
3b3b1820
C
126
127 <div *ngIf="isEmailDisabled()" class="alert alert-danger" i18n>
32d7f2b7 128 We are sorry, you cannot recover your password because your instance administrator did not configure the PeerTube email system.
3b3b1820
C
129 </div>
130
4e082e78 131 <div *ngIf="!isEmailDisabled()" class="mb-4" i18n>
ab0beac7
K
132 Enter your email address and we will send you a link to reset your password.
133 </div>
134
3b3b1820 135 <div class="form-group" [hidden]="isEmailDisabled()">
63347a0f
C
136 <label i18n for="forgot-password-email">Email</label>
137 <input
138 type="email" id="forgot-password-email" i18n-placeholder placeholder="Email address" required
139 [(ngModel)]="forgotPasswordEmail" #forgotPasswordEmailInput
140 >
141 </div>
142 </div>
ecb4e35f 143
63347a0f 144 <div class="modal-footer inputs">
a6d5ff76 145 <input
4e082e78 146 type="button" role="button" i18n-value value="Cancel" class="peertube-button d-none d-sm-block"
a6d5ff76
RK
147 (click)="hideForgotPasswordModal()" (key.enter)="hideForgotPasswordModal()"
148 >
ecb4e35f 149
63347a0f 150 <input
266947e5 151 type="submit" i18n-value="Password reset button" value="Reset" class="peertube-button orange-button"
63347a0f
C
152 (click)="askResetPassword()" [disabled]="!forgotPasswordEmailInput.validity.valid"
153 >
ecb4e35f 154 </div>
63347a0f 155</ng-template>