Skip to content

Commit e96b6a6

Browse files
committed
add new login design
1 parent 647577a commit e96b6a6

12 files changed

Lines changed: 144 additions & 40 deletions

File tree

projects/social_platform/src/app/auth/email-verification/email-verification.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
@include responsive.apply-desktop {
3838
bottom: 0%;
39-
left: 20%;
39+
left: 30%;
4040
min-width: 852px;
4141
}
4242
}

projects/social_platform/src/app/auth/login/login.component.html

Lines changed: 46 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,17 @@
22

33
<form class="auth" [formGroup]="loginForm" (ngSubmit)="onSubmit()" (keyup.enter)="onSubmit()">
44
<div class="auth__wrapper">
5-
<h1 class="auth__title">Вход</h1>
6-
<p class="login__reg">Нет аккаунта? <a routerLink="/auth/register">Зарегистрируйтесь</a></p>
5+
<img class="login__logo" src="/assets/images/shared/logo.svg" alt="logo" />
76
@if (loginForm.get("email"); as email) {
87
<fieldset class="auth__field">
9-
<label for="email" class="field-label">Электронная почта</label>
8+
<label for="email" class="field-label">почта*</label>
109
<app-input
1110
size="big"
1211
[error]="email | controlError"
1312
id="email"
1413
type="email"
1514
formControlName="email"
16-
placeholder="Введите почту"
15+
placeholder="example@example.com"
1716
></app-input>
1817
@if (email | controlError: "email") {
1918
<div class="text-body-10 error">
@@ -28,39 +27,21 @@ <h1 class="auth__title">Вход</h1>
2827
} @if (loginForm.get("password"); as password) {
2928
<fieldset class="auth__field">
3029
<div class="login__password">
31-
<label class="field-label" for="password">Пароль</label>
32-
<a routerLink="/auth/reset_password/send_email" class="login__forget"> Забыли пароль? </a>
30+
<label class="field-label" for="password">пароль</label>
31+
<a routerLink="/auth/reset_password/send_email" class="login__forget">забыли пароль? </a>
3332
</div>
3433
<app-input
3534
size="big"
3635
[error]="password | controlError"
3736
id="password"
3837
[type]="showPassword ? 'text' : 'password'"
3938
formControlName="password"
40-
placeholder="Введите пароль"
39+
placeholder="GJiwoeuhbn120="
4140
>
4241
@if(showPassword) {
43-
<i
44-
appIcon
45-
icon="eye"
46-
appSquare="24"
47-
appWidth="24"
48-
appHeight="24"
49-
appViewBox="0 0 24 24"
50-
class="icon"
51-
(click)="toggleShowPassword()"
52-
></i>
42+
<i appIcon icon="eye" appSquare="18" class="icon" (click)="toggleShowPassword()"></i>
5343
} @else {
54-
<i
55-
appIcon
56-
icon="eye-off"
57-
appSquare="24"
58-
appWidth="24"
59-
appHeight="24"
60-
appViewBox="0 0 24 24"
61-
class="icon"
62-
(click)="toggleShowPassword()"
63-
></i>
44+
<i appIcon icon="eye-off" appSquare="18" class="icon" (click)="toggleShowPassword()"></i>
6445
}
6546
</app-input>
6647
@if (password | controlError: "required") {
@@ -81,7 +62,7 @@ <h1 class="auth__title">Вход</h1>
8162
customTypographyClass="auth__button-typography"
8263
type="submit"
8364
>
84-
Войти
65+
войти
8566
<i
8667
class="auth__button-icon"
8768
appIcon
@@ -91,5 +72,42 @@ <h1 class="auth__title">Вход</h1>
9172
appViewBox="0 0 18 9"
9273
></i>
9374
</app-button>
75+
<div class="login__additional">
76+
<p class="login__reg text-body-12">
77+
нет аккаунта? <a routerLink="/auth/register">зарегистрируйтесь</a>
78+
</p>
79+
<hr />
80+
<p class="text-body-12 login__external">
81+
*Если ты регистрировался через форму на сайте программы кейс-чемпионата, введи данные,
82+
которые ты указывал ранее
83+
</p>
84+
</div>
9485
</div>
9586
</form>
87+
88+
<div class="tooltip">
89+
<app-tooltip
90+
color="grey"
91+
iconSize="40"
92+
(click)="$event.stopPropagation(); toggleTooltip()"
93+
></app-tooltip>
94+
95+
@if (isHintLoginVisible()) {
96+
<div class="tooltip__wrapper" (clickOutside)="toggleTooltip()">
97+
<p class="tooltip__text text-body-10">
98+
Если у тебя есть вопросы, напиши в наш телеграм-бот поддержки
99+
<span>{{ "@procollab_bot" }}</span>
100+
</p>
101+
<br />
102+
103+
<p class="tooltip__text text-body-10">
104+
Если не нашел ответ в боте, напиши в техподдержку. Обычно отвечаем в рабочее время – с
105+
понедельника по пятницу с 10:00 до 18:00 по московскому времени
106+
<br />
107+
<span>{{ "@procollab_support" }}</span>
108+
</p>
109+
</div>
110+
}
111+
</div>
112+
113+
<img class="login__image" src="/assets/images/auth/login-img.png" />

projects/social_platform/src/app/auth/login/login.component.scss

Lines changed: 70 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,38 @@
44
@use "styles/typography";
55

66
.login {
7-
&__reg {
8-
margin-bottom: 30px;
7+
height: 100vh;
8+
9+
&__image {
10+
position: absolute;
11+
right: 0%;
12+
top: 0%;
13+
display: none;
914

10-
@include typography.body-14;
15+
@include responsive.apply-desktop {
16+
display: block;
17+
margin-left: 135px;
18+
width: inherit;
19+
height: 100%;
20+
}
21+
}
22+
23+
&__logo {
24+
position: sticky;
25+
display: block;
26+
width: 95px;
27+
margin-bottom: 20px;
1128

1229
@include responsive.apply-desktop {
13-
@include typography.body-16;
30+
width: 157px;
31+
height: 30px;
1432
}
1533
}
1634

35+
&__reg {
36+
margin-top: 8px;
37+
}
38+
1739
&__forget {
1840
display: block;
1941
text-align: center;
@@ -33,9 +55,53 @@
3355
justify-content: space-between;
3456
margin-top: 12px;
3557
}
58+
59+
&__external {
60+
color: var(--grey-for-text);
61+
width: 80%;
62+
63+
@include responsive.apply-desktop {
64+
width: 100%;
65+
}
66+
}
67+
68+
&__additional {
69+
display: flex;
70+
flex-direction: column;
71+
gap: 8px;
72+
margin-left: 18px;
73+
}
3674
}
3775

3876
.icon {
3977
color: var(--dark-grey);
4078
cursor: pointer;
4179
}
80+
81+
.tooltip {
82+
display: flex;
83+
align-items: center;
84+
height: 135px;
85+
margin-top: 18px;
86+
87+
@include responsive.apply-desktop {
88+
margin-top: 30px;
89+
}
90+
91+
&__wrapper {
92+
width: 260px;
93+
margin-bottom: 140px;
94+
border: 0.5px solid var(--grey-for-text);
95+
border-radius: var(--rounded-lg) var(--rounded-lg) var(--rounded-lg) 0px;
96+
background-color: var(--white);
97+
padding: 18px 10px 10px 16px;
98+
}
99+
100+
&__text {
101+
color: var(--grey-for-text);
102+
103+
span {
104+
color: var(--accent);
105+
}
106+
}
107+
}

projects/social_platform/src/app/auth/login/login.component.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
/** @format */
22

3-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from "@angular/core";
3+
import {
4+
ChangeDetectionStrategy,
5+
ChangeDetectorRef,
6+
Component,
7+
OnInit,
8+
signal,
9+
} from "@angular/core";
410
import { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from "@angular/forms";
511
import { AuthService } from "../services";
612
import { ErrorMessage } from "@error/models/error-message";
713
import { ControlErrorPipe, TokenService, ValidationService } from "projects/core";
814
import { ActivatedRoute, Router, RouterLink } from "@angular/router";
915
import { ButtonComponent, IconComponent, InputComponent } from "@ui/components";
1016
import { CommonModule } from "@angular/common";
17+
import { TooltipComponent } from "@ui/components/tooltip/tooltip.component";
18+
import { ClickOutsideModule } from "ng-click-outside";
1119

1220
/**
1321
* Компонент входа в систему
@@ -40,6 +48,8 @@ import { CommonModule } from "@angular/common";
4048
ButtonComponent,
4149
IconComponent,
4250
ControlErrorPipe,
51+
TooltipComponent,
52+
ClickOutsideModule,
4353
],
4454
})
4555
export class LoginComponent implements OnInit {
@@ -66,11 +76,16 @@ export class LoginComponent implements OnInit {
6676
errorMessage = ErrorMessage;
6777

6878
showPassword = false;
79+
readonly isHintLoginVisible = signal<boolean>(false);
6980

7081
ngOnInit(): void {
7182
this.tokenService.clearTokens();
7283
}
7384

85+
toggleTooltip(): void {
86+
this.isHintLoginVisible.set(!this.isHintLoginVisible());
87+
}
88+
7489
toggleShowPassword() {
7590
this.showPassword = !this.showPassword;
7691
}

projects/social_platform/src/app/office/office.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
display: flex;
114114
flex-direction: column;
115115
gap: 2px;
116-
width: 70%;
116+
width: 80%;
117117
margin-top: 30px;
118118
color: var(--dark-grey);
119119
}

projects/social_platform/src/app/ui/components/tooltip/tooltip.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
[class]="customClass"
99
(mouseenter)="show.emit()"
1010
(mouseleave)="hide.emit()"
11+
[style.color]="color === 'accent' ? 'var(--accent)' : 'var(--grey-for-text)'"
1112
></i>
1213
<span
1314
class="tooltip__content text-body-10"

projects/social_platform/src/app/ui/components/tooltip/tooltip.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ export class TooltipComponent {
4545
/** Дополнительные CSS классы */
4646
@Input() customClass = "";
4747

48+
/** Цвет иконки */
49+
@Input() color: "accent" | "grey" = "accent";
50+
4851
/** Событие показа подсказки */
4952
@Output() show = new EventEmitter<void>();
5053

Lines changed: 1 addition & 1 deletion
Loading

projects/social_platform/src/assets/icons/symbol/svg/sprite.css.svg

Lines changed: 1 addition & 1 deletion
Loading
20.9 KB
Loading

0 commit comments

Comments
 (0)