diff options
author | Chocobozzz <me@florianbigard.com> | 2022-06-15 14:29:28 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-06-15 14:32:30 +0200 |
commit | 1105696623c4b691bf2d44489ad25a752cbd8cc7 (patch) | |
tree | dea539b64cd3aab542444a4905146bbe72355d5e /client/src/app/+login/login.component.html | |
parent | 428025432b111dcee90ba4a47eeaac8b03f4c4f6 (diff) | |
download | PeerTube-1105696623c4b691bf2d44489ad25a752cbd8cc7.tar.gz PeerTube-1105696623c4b691bf2d44489ad25a752cbd8cc7.tar.zst PeerTube-1105696623c4b691bf2d44489ad25a752cbd8cc7.zip |
Improve login page UI
Diffstat (limited to 'client/src/app/+login/login.component.html')
-rw-r--r-- | client/src/app/+login/login.component.html | 75 |
1 files changed, 40 insertions, 35 deletions
diff --git a/client/src/app/+login/login.component.html b/client/src/app/+login/login.component.html index a2d8dae2a..10e25a936 100644 --- a/client/src/app/+login/login.component.html +++ b/client/src/app/+login/login.component.html | |||
@@ -1,15 +1,37 @@ | |||
1 | <div class="margin-content"> | 1 | <h1 i18n class="title-page-v2"> |
2 | <div i18n class="title-page title-page-single"> | 2 | <strong class="underline-orange">{{ instanceName }}</strong> |
3 | Login | 3 | > |
4 | </div> | 4 | Login |
5 | </h1> | ||
5 | 6 | ||
7 | <div class="margin-content"> | ||
6 | <div class="alert alert-danger" i18n *ngIf="externalAuthError"> | 8 | <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>. | 9 | Sorry but there was an issue with the external login process. Please <a routerLink="/about">contact an administrator</a>. |
8 | </div> | 10 | </div> |
9 | 11 | ||
10 | <ng-container *ngIf="!externalAuthError && !isAuthenticatedWithExternalAuth"> | 12 | <ng-container *ngIf="!externalAuthError && !isAuthenticatedWithExternalAuth"> |
11 | <div *ngIf="error" class="alert alert-danger">{{ error }} | 13 | <div *ngIf="error" class="alert alert-danger"> |
12 | <span *ngIf="error === 'User email is not verified.'"> <a i18n routerLink="/verify-account/ask-send-email">Request new verification email.</a></span> | 14 | {{ error }} |
15 | |||
16 | <span *ngIf="error === 'User email is not verified.'"> | ||
17 | <a i18n routerLink="/verify-account/ask-send-email">Request new verification email.</a> | ||
18 | </span> | ||
19 | </div> | ||
20 | |||
21 | <div class="alert pt-alert-primary" role="alert"> | ||
22 | <h5 class="alert-heading" i18n> | ||
23 | Logging into an account lets you publish content | ||
24 | </h5> | ||
25 | |||
26 | <p *ngIf="signupAllowed" i18n> | ||
27 | This instance allows registration. However, be careful to check the <a class="link-orange terms-anchor" (click)="onTermsClick($event, instanceInformation)" href='#'>Terms</a><a class="terms-link" target="_blank" routerLink="/about/instance" fragment="terms">Terms</a> before creating an account. | ||
28 | 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>. | ||
29 | </p> | ||
30 | |||
31 | <p *ngIf="!signupAllowed" i18n> | ||
32 | Currently this instance doesn't allow for user registration, you may check the <a (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. | ||
33 | 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>. | ||
34 | </p> | ||
13 | </div> | 35 | </div> |
14 | 36 | ||
15 | <div class="wrapper"> | 37 | <div class="wrapper"> |
@@ -18,16 +40,14 @@ | |||
18 | <form myPluginSelector pluginSelectorId="login-form" role="form" (ngSubmit)="login()" [formGroup]="form"> | 40 | <form myPluginSelector pluginSelectorId="login-form" role="form" (ngSubmit)="login()" [formGroup]="form"> |
19 | <div class="form-group"> | 41 | <div class="form-group"> |
20 | <div> | 42 | <div> |
21 | <label i18n for="username">User</label> | 43 | <label i18n for="username">Username or email address</label> |
22 | <input | 44 | <input |
23 | type="text" id="username" i18n-placeholder placeholder="Username or email address" required tabindex="1" | 45 | type="text" id="username" i18n-placeholder placeholder="Example: john@example.com" required tabindex="1" |
24 | formControlName="username" class="form-control" [ngClass]="{ 'input-error': formErrors['username'] }" myAutofocus | 46 | formControlName="username" class="form-control" [ngClass]="{ 'input-error': formErrors['username'] }" myAutofocus |
25 | > | 47 | > |
26 | </div> | 48 | </div> |
27 | 49 | ||
28 | <div *ngIf="formErrors.username" class="form-error"> | 50 | <div *ngIf="formErrors.username" class="form-error">{{ formErrors.username }}</div> |
29 | {{ formErrors.username }} | ||
30 | </div> | ||
31 | 51 | ||
32 | <div *ngIf="hasUsernameUppercase()" i18n class="form-warning"> | 52 | <div *ngIf="hasUsernameUppercase()" i18n class="form-warning"> |
33 | ⚠️ Most email addresses do not include capital letters. | 53 | ⚠️ Most email addresses do not include capital letters. |
@@ -36,40 +56,24 @@ | |||
36 | 56 | ||
37 | <div class="form-group"> | 57 | <div class="form-group"> |
38 | <label i18n for="password">Password</label> | 58 | <label i18n for="password">Password</label> |
59 | |||
39 | <my-input-text formControlName="password" inputId="password" | 60 | <my-input-text formControlName="password" inputId="password" |
40 | i18n-placeholder placeholder="Password" | 61 | i18n-placeholder placeholder="Password" |
41 | [ngClass]="{ 'input-error': formErrors['password'] }" | 62 | [ngClass]="{ 'input-error': formErrors['password'] }" |
42 | autocomplete="current-password" [tabindex]="2"></my-input-text> | 63 | autocomplete="current-password" [tabindex]="2"></my-input-text> |
43 | <div *ngIf="formErrors.password" class="form-error"> | 64 | |
44 | {{ formErrors.password }} | 65 | <div *ngIf="formErrors.password" class="form-error">{{ formErrors.password }}</div> |
45 | </div> | ||
46 | </div> | 66 | </div> |
47 | 67 | ||
48 | <input type="submit" class="peertube-button orange-button" i18n-value value="Login" [disabled]="!form.valid"> | 68 | <input type="submit" class="peertube-button orange-button" i18n-value value="Login" [disabled]="!form.valid"> |
49 | 69 | ||
50 | <div class="additionnal-links"> | 70 | <div class="additional-links"> |
51 | <a i18n role="button" class="forgot-password-button" (click)="openForgotPasswordModal()" i18n-title title="Click here to reset your password">I forgot my password</a> | 71 | <a i18n role="button" class="link-orange" (click)="openForgotPasswordModal()" i18n-title title="Click here to reset your password">I forgot my password</a> |
52 | 72 | ||
53 | <div *ngIf="signupAllowed" class="signup-link"> | 73 | <ng-container *ngIf="signupAllowed"> |
54 | <span>·</span> | 74 | <span>·</span> |
55 | <a i18n routerLink="/signup" class="create-an-account">Create an account</a> | 75 | <a i18n routerLink="/signup" class="link-orange">Create an account</a> |
56 | </div> | 76 | </ng-container> |
57 | </div> | ||
58 | |||
59 | <div class="looking-for-account alert alert-info" role="alert"> | ||
60 | <h6 class="alert-heading" i18n> | ||
61 | Logging into an account lets you publish content | ||
62 | </h6> | ||
63 | |||
64 | <div *ngIf="signupAllowed" i18n> | ||
65 | This instance allows registration. However, be careful to check the <a class="terms-anchor" (click)="onTermsClick($event, instanceInformation)" href='#'>Terms</a><a class="terms-link" target="_blank" routerLink="/about/instance" fragment="terms">Terms</a> before creating an account. | ||
66 | You may also search for another instance to match your exact needs at: <br /><a class="alert-link" href="https://joinpeertube.org/instances" target="_blank" rel="noopener noreferrer">https://joinpeertube.org/instances</a>. | ||
67 | </div> | ||
68 | |||
69 | <div *ngIf="!signupAllowed" i18n> | ||
70 | Currently this instance doesn't allow for user registration, you may check the <a (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. | ||
71 | Find yours among multiple instances at: <br /> <a class="alert-link" href="https://joinpeertube.org/instances" target="_blank" rel="noopener noreferrer">https://joinpeertube.org/instances</a>. | ||
72 | </div> | ||
73 | </div> | 77 | </div> |
74 | </form> | 78 | </form> |
75 | 79 | ||
@@ -86,6 +90,7 @@ | |||
86 | 90 | ||
87 | <div #instanceInformation class="instance-information"> | 91 | <div #instanceInformation class="instance-information"> |
88 | <my-instance-about-accordion | 92 | <my-instance-about-accordion |
93 | [displayInstanceName]="false" | ||
89 | (init)="onInstanceAboutAccordionInit($event)" [panels]="instanceInformationPanels" | 94 | (init)="onInstanceAboutAccordionInit($event)" [panels]="instanceInformationPanels" |
90 | pluginScope="login" pluginHook="filter:login.instance-about-plugin-panels.create.result" | 95 | pluginScope="login" pluginHook="filter:login.instance-about-plugin-panels.create.result" |
91 | ></my-instance-about-accordion> | 96 | ></my-instance-about-accordion> |