[DEV] simplify sign-in gui

This commit is contained in:
Edouard DUPIN 2023-01-08 12:22:25 +01:00
parent 35f15bae61
commit 39e463647e
3 changed files with 11 additions and 47 deletions

View File

@ -8,23 +8,21 @@
</div>
<div class="container">
<label for="login_field"><b>{{loginType}}</b></label>
<input
id="username"
name="username"
type="text"
required=""
placeholder="Enter Username/e-mail"
<app-entry
[value]="login"
(input)="checkLogin($event.target.value)" />
<div class="error color-shadow-black" *ngIf="loginState !== true && loginState !== false">{{loginState}}</div>
<label for="password"><b>Password</b></label> <a class="forgot" href="#">Forgot password?</a>
placeholder="Enter Username/e-mail"
[hasError]="loginState !== true"
(changeValue)="checkLogin($event)"></app-entry>
<app-error-message-state [value]="loginState"></app-error-message-state>
<label for="password"><b>Password</b></label> <a class="forgot" href="#">Forgot password?</a>
<app-password-entry
[value]="password"
placeholder="Enter new password (verify)"
[hasError]="passwordState !== true"
(changeValue)="checkPassword($event)"></app-password-entry>
<div class="error color-shadow-black" *ngIf="passwordState !== true && passwordState !== false">{{passwordState}}</div>
<app-error-message-state [value]="passwordState"></app-error-message-state>
<label class="container-checkbox">
Remember me
<input
@ -43,15 +41,13 @@
*ngIf="ssoReady"
id="login-button"
[disabled]="loginButtonDisabled"
(click)="onLogin()"
type="submit">
(click)="onLogin()">
Login
</button>
<button
class="button login color-button-validate color-shadow-black"
*ngIf="!ssoReady"
[disabled]="true"
type="submit">
[disabled]="true">
Login (wait info)
</button>
</div>

View File

@ -62,38 +62,6 @@ span.psw {
buttum: 0;
line-height: 24px;
}
.error {
background-color: #f44336;
position: absolute;
z-index: 10;
display: block;
max-width: 450px;
padding: 5px 8px;
margin: 2px 0 0;
font-size: 16px;
font-weight: 400;
border-style: solid;
border-width: 0px;
box-sizing: border-box;
&:after,
&:before {
bottom: 100%;
left: 25px;
border: solid transparent;
content: ' ';
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
&:after {
border-bottom-color: #f44336;
border-width: 10px;
margin-left: -10px;
}
}
.container-global {
position: relative;

View File

@ -8,7 +8,7 @@ import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
import { SessionService } from 'common/service';
import { checkEmailValidity, checkLoginValidity, checkPasswordValidity, createLoginState, createPasswordState, getLoginType, isNullOrUndefined } from 'common/utils';
import { createLoginState, createPasswordState, getLoginType, isNullOrUndefined } from 'common/utils';
import { AdminUserService, ApplicationService } from 'app/service';
import { SpecificTokenResponse } from 'app/service/application';