Skip to content

Commit 190011f

Browse files
authored
Merge pull request #255 from PROCOLLAB-github/news-field-fix
News field fix
2 parents 08a010f + cf98abf commit 190011f

8 files changed

Lines changed: 45 additions & 26 deletions

File tree

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@
22

33
<form class="form" [formGroup]="messageForm" (ngSubmit)="onSubmit()">
44
<div class="form__row">
5-
<app-input
5+
<app-textarea
66
size="big"
77
formControlName="text"
8-
[hasBorder]="false"
98
class="form__input text-body-12"
109
autosize
1110
placeholder="сегодня был хороший день"
1211
(paste)="onPaste($event)"
1312
(keydown.meta.enter)="onSubmit()"
1413
[maxLength]="15940"
15-
></app-input>
14+
></app-textarea>
1615
<i appIcon icon="send" appSquare="12" class="form__send" (click)="onSubmit()"></i>
1716
</div>
1817
<div class="form__images">

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,18 @@
88
display: flex;
99
align-items: center;
1010

11-
::ng-deep app-input {
12-
input {
11+
::ng-deep app-textarea {
12+
textarea {
1313
width: 100%;
14-
background-color: transparent;
15-
border-bottom: 0.5px solid var(--medium-grey-for-outline);
14+
min-height: 50px;
15+
padding: 0 0 10px 8px;
16+
background: transparent;
17+
border: none;
18+
19+
&:focus {
20+
border: none;
21+
box-shadow: none;
22+
}
1623
}
1724
}
1825

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { FileUploadItemComponent } from "@ui/components/file-upload-item/file-up
1010
import { IconComponent, InputComponent } from "@ui/components";
1111
import { AutosizeModule } from "ngx-autosize";
1212
import { ImgCardComponent } from "@office/shared/img-card/img-card.component";
13+
import { TextareaComponent } from "@ui/components/textarea/textarea.component";
1314

1415
/**
1516
* Компонент формы создания новости
@@ -42,6 +43,7 @@ import { ImgCardComponent } from "@office/shared/img-card/img-card.component";
4243
FileUploadItemComponent,
4344
InputComponent,
4445
ImgCardComponent,
46+
TextareaComponent,
4547
],
4648
})
4749
export class NewsFormComponent implements OnInit {

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

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ export class OfficeComponent implements OnInit, OnDestroy {
7878
showRegisteredProgramModal = signal<boolean>(false);
7979

8080
registeredProgramToShow?: Program | null = null;
81-
private pendingRegisteredModalCheck = false;
8281

8382
inviteErrorModal = false;
8483

@@ -152,8 +151,6 @@ export class OfficeComponent implements OnInit, OnDestroy {
152151
onAcceptWaitVerification() {
153152
this.waitVerificationAccepted = true;
154153
localStorage.setItem("waitVerificationAccepted", "true");
155-
this.pendingRegisteredModalCheck = true;
156-
this.tryShowRegisteredProgramModal();
157154
}
158155

159156
onRejectInvite(inviteId: number): void {
@@ -196,24 +193,17 @@ export class OfficeComponent implements OnInit, OnDestroy {
196193
}
197194

198195
private tryShowRegisteredProgramModal(): void {
199-
if (!this.pendingRegisteredModalCheck) return;
200-
201196
const programs = this.programs();
202197
if (!programs || programs.length === 0) return;
203198

204199
const memberProgram = programs.find(p => p.isUserMember);
205-
if (!memberProgram) {
206-
this.pendingRegisteredModalCheck = false;
207-
return;
208-
}
200+
if (!memberProgram) return;
209201

210-
if (!this.hasSeenRegisteredProgramModal(memberProgram.id)) {
211-
this.registeredProgramToShow = memberProgram;
212-
this.showRegisteredProgramModal.set(true);
213-
this.markSeenRegisteredProgramModal(memberProgram.id);
214-
}
202+
if (this.hasSeenRegisteredProgramModal(memberProgram.id)) return;
215203

216-
this.pendingRegisteredModalCheck = false;
204+
this.registeredProgramToShow = memberProgram;
205+
this.showRegisteredProgramModal.set(true);
206+
this.markSeenRegisteredProgramModal(memberProgram.id);
217207
}
218208

219209
private getRegisteredProgramSeenKey(programId: number): string {

projects/social_platform/src/app/office/program/detail/main/main.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ <h3 class="links__title text-body-12">материалы</h3>
169169
<app-modal [open]="registeredProgramModal()" (openChange)="registeredProgramModal.set(false)">
170170
<div class="cancel" style="width: 605px; padding: 0px 24px">
171171
<div class="cancel__top">
172-
<p class="cancel__title text-body-14">поздравляем, с регистрацией на программу! 🎉</p>
172+
<p class="cancel__title text-body-14">поздравляем с регистрацией на программу! 🎉</p>
173173
</div>
174174

175175
<div class="cancel__text-block">
@@ -193,8 +193,8 @@ <h3 class="links__title text-body-12">материалы</h3>
193193
</p>
194194

195195
<p class="text-body-12">
196-
Будьте внимательны: по истечению дедлайна, определенного организаторами, кнопка становится
197-
не кликабельной 👻
196+
Будьте внимательны: по истечению дедлайна определенного организаторами, кнопка становится
197+
некликабельной 👻
198198
</p>
199199
</div>
200200

projects/social_platform/src/styles.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@
2525
@import "styles/pages/project-detail.scss";
2626

2727
:root {
28-
--app-height: 100%;
28+
--app-height: 100vh;
29+
}
30+
31+
html {
32+
scrollbar-gutter: stable;
2933
}
3034

3135
html,

projects/ui/src/lib/components/layout/profile-control-panel/profile-control-panel.component.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
<div class="attention"></div>
99
}
1010
<i appIcon icon="bell" appWidth="15" appHeight="17" appViewBox="0 0 15 17"></i>
11+
@if (invites.length) {
12+
<div class="control-panel__bell--hasInvites"></div>
13+
}
1114
</div>
1215
</div>
1316
@if (showNotifications) {

projects/ui/src/lib/components/layout/profile-control-panel/profile-control-panel.component.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,18 @@
3131
z-index: 20;
3232
margin-top: 10px;
3333
}
34+
35+
&__bell {
36+
position: relative;
37+
38+
&--hasInvites {
39+
position: absolute;
40+
top: -5%;
41+
left: 0%;
42+
width: 6px;
43+
height: 6px;
44+
background-color: var(--red);
45+
border-radius: 100%;
46+
}
47+
}
3448
}

0 commit comments

Comments
 (0)