aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+login
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+login')
-rw-r--r--client/src/app/+login/login.component.html8
-rw-r--r--client/src/app/+login/login.component.scss24
-rw-r--r--client/src/app/+login/login.component.ts7
3 files changed, 9 insertions, 30 deletions
diff --git a/client/src/app/+login/login.component.html b/client/src/app/+login/login.component.html
index 3171e5b0f..5f5b0f565 100644
--- a/client/src/app/+login/login.component.html
+++ b/client/src/app/+login/login.component.html
@@ -21,7 +21,7 @@
21 <label i18n for="username">User</label> 21 <label i18n for="username">User</label>
22 <input 22 <input
23 type="text" id="username" i18n-placeholder placeholder="Username or email address" required tabindex="1" 23 type="text" id="username" i18n-placeholder placeholder="Username or email address" required tabindex="1"
24 formControlName="username" class="form-control" [ngClass]="{ 'input-error': formErrors['username'] }" #usernameInput 24 formControlName="username" class="form-control" [ngClass]="{ 'input-error': formErrors['username'] }" autofocus
25 > 25 >
26 </div> 26 </div>
27 27
@@ -41,7 +41,7 @@
41 </div> 41 </div>
42 </div> 42 </div>
43 43
44 <input type="submit" i18n-value value="Login" [disabled]="!form.valid"> 44 <input type="submit" class="peertube-button orange-button" i18n-value value="Login" [disabled]="!form.valid">
45 45
46 <div class="additionnal-links"> 46 <div class="additionnal-links">
47 <a i18n class="forgot-password-button" (click)="openForgotPasswordModal()" i18n-title title="Click here to reset your password">I forgot my password</a> 47 <a i18n class="forgot-password-button" (click)="openForgotPasswordModal()" i18n-title title="Click here to reset your password">I forgot my password</a>
@@ -114,12 +114,12 @@
114 114
115 <div class="modal-footer inputs"> 115 <div class="modal-footer inputs">
116 <input 116 <input
117 type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel" 117 type="button" role="button" i18n-value value="Cancel" class="peertube-button grey-button"
118 (click)="hideForgotPasswordModal()" (key.enter)="hideForgotPasswordModal()" 118 (click)="hideForgotPasswordModal()" (key.enter)="hideForgotPasswordModal()"
119 > 119 >
120 120
121 <input 121 <input
122 type="submit" i18n-value="Password reset button" value="Reset" class="action-button-submit" 122 type="submit" i18n-value="Password reset button" value="Reset" class="peertube-button orange-button"
123 (click)="askResetPassword()" [disabled]="!forgotPasswordEmailInput.validity.valid" 123 (click)="askResetPassword()" [disabled]="!forgotPasswordEmailInput.validity.valid"
124 > 124 >
125 </div> 125 </div>
diff --git a/client/src/app/+login/login.component.scss b/client/src/app/+login/login.component.scss
index 3cc302aec..eddaff542 100644
--- a/client/src/app/+login/login.component.scss
+++ b/client/src/app/+login/login.component.scss
@@ -8,16 +8,9 @@ label {
8 display: block; 8 display: block;
9} 9}
10 10
11input:not([type=submit]) { 11input[type=text],
12input[type=email] {
12 @include peertube-input-text(340px); 13 @include peertube-input-text(340px);
13 display: inline-block;
14 margin-right: 5px;
15
16}
17
18input[type=submit] {
19 @include peertube-button;
20 @include orange-button;
21} 14}
22 15
23.modal-body { 16.modal-body {
@@ -28,13 +21,6 @@ input[type=submit] {
28 } 21 }
29} 22}
30 23
31.modal-footer.inputs {
32 .action-button.action-button-cancel {
33 width: auto !important;
34 display: inline-block;
35 }
36}
37
38@media screen and (max-width: #{map-get($container-max-widths, sm)}) { 24@media screen and (max-width: #{map-get($container-max-widths, sm)}) {
39 .modal-body { 25 .modal-body {
40 #forgot-password-email { 26 #forgot-password-email {
@@ -42,10 +28,8 @@ input[type=submit] {
42 } 28 }
43 } 29 }
44 30
45 .modal-footer.inputs { 31 .modal-footer .grey-button {
46 .action-button.action-button-cancel { 32 display: none;
47 display: none;
48 }
49 } 33 }
50} 34}
51 35
diff --git a/client/src/app/+login/login.component.ts b/client/src/app/+login/login.component.ts
index af747b7fa..d8ad49081 100644
--- a/client/src/app/+login/login.component.ts
+++ b/client/src/app/+login/login.component.ts
@@ -3,9 +3,9 @@ import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angula
3import { ActivatedRoute } from '@angular/router' 3import { ActivatedRoute } from '@angular/router'
4import { AuthService, Notifier, RedirectService, UserService } from '@app/core' 4import { AuthService, Notifier, RedirectService, UserService } from '@app/core'
5import { HooksService } from '@app/core/plugins/hooks.service' 5import { HooksService } from '@app/core/plugins/hooks.service'
6import { InstanceAboutAccordionComponent } from '@app/shared/shared-instance'
7import { LOGIN_PASSWORD_VALIDATOR, LOGIN_USERNAME_VALIDATOR } from '@app/shared/form-validators/login-validators' 6import { LOGIN_PASSWORD_VALIDATOR, LOGIN_USERNAME_VALIDATOR } from '@app/shared/form-validators/login-validators'
8import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' 7import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
8import { InstanceAboutAccordionComponent } from '@app/shared/shared-instance'
9import { NgbAccordion, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' 9import { NgbAccordion, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'
10import { RegisteredExternalAuthConfig, ServerConfig } from '@shared/models' 10import { RegisteredExternalAuthConfig, ServerConfig } from '@shared/models'
11 11
@@ -16,7 +16,6 @@ import { RegisteredExternalAuthConfig, ServerConfig } from '@shared/models'
16}) 16})
17 17
18export class LoginComponent extends FormReactive implements OnInit, AfterViewInit { 18export class LoginComponent extends FormReactive implements OnInit, AfterViewInit {
19 @ViewChild('usernameInput', { static: false }) usernameInput: ElementRef
20 @ViewChild('forgotPasswordModal', { static: true }) forgotPasswordModal: ElementRef 19 @ViewChild('forgotPasswordModal', { static: true }) forgotPasswordModal: ElementRef
21 20
22 accordion: NgbAccordion 21 accordion: NgbAccordion
@@ -91,10 +90,6 @@ export class LoginComponent extends FormReactive implements OnInit, AfterViewIni
91 } 90 }
92 91
93 ngAfterViewInit () { 92 ngAfterViewInit () {
94 if (this.usernameInput) {
95 this.usernameInput.nativeElement.focus()
96 }
97
98 this.hooks.runAction('action:login.init', 'login') 93 this.hooks.runAction('action:login.init', 'login')
99 } 94 }
100 95