Skip to content

Commit b09a67b

Browse files
authored
Merge pull request #251 from PROCOLLAB-github/new-tooltips
New tooltips
2 parents 9b3453f + d90de3c commit b09a67b

38 files changed

Lines changed: 818 additions & 48 deletions

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
<div class="login">
44
<div class="login__left">
5-
<!-- Центр -->
65
<div class="login__left-content">
76
<form class="auth" [formGroup]="loginForm" (ngSubmit)="onSubmit()" (keyup.enter)="onSubmit()">
87
<div class="auth__wrapper">
@@ -107,7 +106,6 @@
107106
</form>
108107
</div>
109108

110-
<!-- Низ -->
111109
<div class="login__left-footer">
112110
<div class="tooltip">
113111
<app-tooltip
@@ -119,16 +117,25 @@
119117
@if (isHintLoginVisible()) {
120118
<div class="tooltip__wrapper" (clickOutside)="toggleTooltip()">
121119
<p class="tooltip__text text-body-10">
122-
Если у тебя есть вопросы, напиши в наш телеграм-бот поддержки
120+
Возникли технические сложности или остались вопросы?
121+
</p>
122+
<p class="tooltip__text text-body-10">
123+
Все ответы в нашем боте поддержки
123124
<a href="https://t.me/procollab_bot">{{ "@procollab_bot" }}</a>
124125
</p>
125126

126127
<br />
127128

128129
<p class="tooltip__text text-body-10">
129-
Если не нашел ответ в боте, напиши в техподдержку —
130+
Для уникальных кейсов или нерешаемых сложностей на связи наша техническая поддержка –
130131
<a href="https://t.me/procollab_support">{{ "@procollab_support" }}</a>
131132
</p>
133+
134+
<br />
135+
136+
<p class="tooltip__text text-body-10">
137+
Время работы оператора:  пн-пт, 10:00-19:00 по московскому времени
138+
</p>
132139
</div>
133140
}
134141
</div>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
position: absolute;
9898
bottom: 22px;
9999
left: 38px;
100-
width: 260px;
100+
width: 310px;
101101
padding: 18px 10px 10px 16px;
102102
background-color: var(--white);
103103
border: 0.5px solid var(--grey-for-text);

projects/social_platform/src/app/office/features/news-form/news-form.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
placeholder="сегодня был хороший день"
1212
(paste)="onPaste($event)"
1313
(keydown.meta.enter)="onSubmit()"
14+
[maxLength]="15940"
1415
></app-input>
1516
<i appIcon icon="send" appSquare="12" class="form__send" (click)="onSubmit()"></i>
1617
</div>

projects/social_platform/src/app/office/features/project-rating/project-rating.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
size="big"
3030
[formControlName]="criterion.id"
3131
placeholder="Небольшой комментарий, если необходимо"
32+
[maxLength]="50"
3233
></app-textarea>
3334

3435
@if (form.get(criterion.id.toString())?.errors?.['maxlength']) {

projects/social_platform/src/app/office/features/project-rating/project-rating.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ import { ControlErrorPipe } from "@corelib";
4949
RangeCriterionInputComponent,
5050
BooleanCriterionComponent,
5151
ReactiveFormsModule,
52-
ControlErrorPipe,
5352
],
5453
templateUrl: "./project-rating.component.html",
5554
styleUrl: "./project-rating.component.scss",

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

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,46 @@ <h3 class="message-modal__title text-body-14">Ваш аккаунт проход
6969
</div>
7070
</app-modal>
7171

72+
<app-modal
73+
[open]="showRegisteredProgramModal()"
74+
(openChange)="showRegisteredProgramModal.set(!showRegisteredProgramModal())"
75+
>
76+
<div class="cancel" style="width: 605px; padding: 0px 24px">
77+
<div class="cancel__top">
78+
<p class="cancel__title text-body-14">Привет!</p>
79+
</div>
80+
81+
<div class="cancel__text-block">
82+
<p class="text-body-12">
83+
Рады знакомству 🙌 <br />
84+
Вы находитесь на платформе procollab – здесь проходит программа, на которую вы ранее
85+
регистрировались через форму заявки
86+
</p>
87+
88+
<p class="text-body-12">
89+
Ваша программа и её закрытая группа (к которой у вас автоматически есть доступ) находится
90+
в одноименной вкладке «программы»
91+
</p>
92+
93+
<p class="text-body-12">
94+
На платформе есть еще много интересного: цифровой профиль, проекты, новостная лента, чаты
95+
и другое – рекомендуем изучить
96+
</p>
97+
98+
<p class="text-body-12">
99+
Поздравляем с регистрацией! Желаем удачи в прохождении программы :)
100+
</p>
101+
</div>
102+
103+
<app-button
104+
customTypographyClass="text-body-12"
105+
size="medium"
106+
(click)="showRegisteredProgramModal.set(false)"
107+
>спасибо, понятно</app-button
108+
>
109+
</div>
110+
</app-modal>
111+
72112
<app-modal [open]="inviteErrorModal">
73113
<div class="message-modal">
74114
<h3 class="message-modal__title text-body-14">Приглашение на текущий проект было удалено</h3>

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

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,59 @@
134134
}
135135
}
136136

137+
.cancel {
138+
position: relative;
139+
display: flex;
140+
flex-direction: column;
141+
align-items: center;
142+
justify-content: center;
143+
max-height: calc(100vh - 40px);
144+
145+
i {
146+
position: absolute;
147+
top: 0;
148+
right: 0;
149+
cursor: pointer;
150+
}
151+
152+
&__top {
153+
display: flex;
154+
flex-direction: column;
155+
gap: 10px;
156+
align-items: center;
157+
margin-bottom: 10px;
158+
}
159+
160+
&__title {
161+
text-align: center;
162+
}
163+
164+
&__text {
165+
width: 40%;
166+
color: var(--dark-grey);
167+
text-align: center;
168+
169+
&-block {
170+
display: flex;
171+
flex-direction: column;
172+
gap: 12px;
173+
margin: 30px 0;
174+
}
175+
176+
&-list {
177+
margin-left: 20px;
178+
179+
li {
180+
list-style-type: disc;
181+
}
182+
}
183+
}
184+
185+
&__button {
186+
margin-top: 20px;
187+
}
188+
}
189+
137190
.container {
138191
width: 100%;
139192
max-width: 1040px;

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

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,13 @@ export class OfficeComponent implements OnInit, OnDestroy {
7575
waitVerificationModal = false;
7676
waitVerificationAccepted = false;
7777

78+
showRegisteredProgramModal = signal<boolean>(false);
79+
80+
registeredProgramToShow?: Program | null = null;
81+
private pendingRegisteredModalCheck = false;
82+
7883
inviteErrorModal = false;
84+
7985
protected readonly programs = signal<Program[]>([]);
8086

8187
navItems: {
@@ -107,7 +113,6 @@ export class OfficeComponent implements OnInit, OnDestroy {
107113
this.subscriptions$.push(profileSub$);
108114

109115
this.chatService.connect().subscribe(() => {
110-
// Change users online status
111116
this.chatService.onSetOffline().subscribe(evt => {
112117
this.chatService.setOnlineStatus(evt.userId, false);
113118
});
@@ -133,6 +138,7 @@ export class OfficeComponent implements OnInit, OnDestroy {
133138
(program: Program) => Date.now() < Date.parse(program.datetimeRegistrationEnds)
134139
);
135140
this.programs.set(resultPrograms.slice(0, 3));
141+
this.tryShowRegisteredProgramModal();
136142
},
137143
});
138144

@@ -146,6 +152,8 @@ export class OfficeComponent implements OnInit, OnDestroy {
146152
onAcceptWaitVerification() {
147153
this.waitVerificationAccepted = true;
148154
localStorage.setItem("waitVerificationAccepted", "true");
155+
this.pendingRegisteredModalCheck = true;
156+
this.tryShowRegisteredProgramModal();
149157
}
150158

151159
onRejectInvite(inviteId: number): void {
@@ -187,6 +195,47 @@ export class OfficeComponent implements OnInit, OnDestroy {
187195
);
188196
}
189197

198+
private tryShowRegisteredProgramModal(): void {
199+
if (!this.pendingRegisteredModalCheck) return;
200+
201+
const programs = this.programs();
202+
if (!programs || programs.length === 0) return;
203+
204+
const memberProgram = programs.find(p => p.isUserMember);
205+
if (!memberProgram) {
206+
this.pendingRegisteredModalCheck = false;
207+
return;
208+
}
209+
210+
if (!this.hasSeenRegisteredProgramModal(memberProgram.id)) {
211+
this.registeredProgramToShow = memberProgram;
212+
this.showRegisteredProgramModal.set(true);
213+
this.markSeenRegisteredProgramModal(memberProgram.id);
214+
}
215+
216+
this.pendingRegisteredModalCheck = false;
217+
}
218+
219+
private getRegisteredProgramSeenKey(programId: number): string {
220+
return `program_registered_modal_seen_${programId}`;
221+
}
222+
223+
private hasSeenRegisteredProgramModal(programId: number): boolean {
224+
try {
225+
return !!localStorage.getItem(this.getRegisteredProgramSeenKey(programId));
226+
} catch (e) {
227+
return false;
228+
}
229+
}
230+
231+
private markSeenRegisteredProgramModal(programId: number): void {
232+
try {
233+
localStorage.setItem(this.getRegisteredProgramSeenKey(programId), "1");
234+
} catch (e) {
235+
// ignore storage errors
236+
}
237+
}
238+
190239
private buildNavItems(profile: User) {
191240
this.navItems = [
192241
{ name: "мой профиль", icon: "person", link: `profile/${profile.id}` },

projects/social_platform/src/app/office/onboarding/stage-one/stage-one.component.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,15 @@
55
&__greeting {
66
position: relative;
77
display: flex;
8+
flex-direction: column;
89
gap: 10px;
9-
align-items: center;
10+
max-width: 100%;
11+
12+
@include responsive.apply-desktop {
13+
flex-direction: row;
14+
align-items: center;
15+
max-width: 60%;
16+
}
1017
}
1118
}
1219

projects/social_platform/src/app/office/onboarding/stage-two/stage-two.component.scss

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,15 @@
55
&__greeting {
66
position: relative;
77
display: flex;
8+
flex-direction: column;
89
gap: 10px;
9-
align-items: center;
10+
max-width: 100%;
11+
12+
@include responsive.apply-desktop {
13+
flex-direction: row;
14+
align-items: center;
15+
max-width: 60%;
16+
}
1017
}
1118
}
1219

@@ -15,6 +22,14 @@
1522
display: inline-flex;
1623
gap: 10px;
1724
align-items: center;
25+
26+
::ng-deep {
27+
app-tooltip {
28+
.tooltip__content--right {
29+
top: 110%;
30+
}
31+
}
32+
}
1833
}
1934

2035
.content {

0 commit comments

Comments
 (0)