From 427570a2934c4e8a26315189cd5feca12ec4996c Mon Sep 17 00:00:00 2001 From: Pavlo Sobkiv Date: Fri, 22 Sep 2023 01:11:27 +0300 Subject: [PATCH 1/6] Corrected CSS to My place page. Corrected localization for pop-up of habits in progress --- .../calendar-base/calendar-base.component.ts | 18 ++++++----- .../eco-places/eco-places.component.scss | 2 +- .../profile-progress.component.scss | 2 +- .../shopping-list.component.scss | 2 +- .../users-achievements.component.html | 6 ++-- .../users-achievements.component.scss | 24 +++++++++----- .../users-friends.component.scss | 31 ++++++++++++++++++- 7 files changed, 64 insertions(+), 21 deletions(-) diff --git a/src/app/main/component/shared/components/calendar-base/calendar-base.component.ts b/src/app/main/component/shared/components/calendar-base/calendar-base.component.ts index 5111f076e9..de3baef534 100644 --- a/src/app/main/component/shared/components/calendar-base/calendar-base.component.ts +++ b/src/app/main/component/shared/components/calendar-base/calendar-base.component.ts @@ -94,14 +94,16 @@ export class CalendarBaseComponent implements OnDestroy { public subscribeToLangChange(): void { this.langChangeSub = this.translate.onDefaultLangChange.subscribe((res) => { - const translations = res.translations.profile.calendar; - this.daysName = translations.days; - this.months = translations.months; - this.monthsShort = translations.monthsShort; - this.monthAndYearName = `${this.months[this.currentMonth]} ${this.currentYear}`; - this.markCurrentDayOfWeek(); - this.buildMonthCalendar(this.monthsShort); - this.getUserHabits(true, this.calendarDay); + setTimeout(() => { + const translations = res.translations.profile.calendar; + this.daysName = translations.days; + this.months = translations.months; + this.monthsShort = translations.monthsShort; + this.monthAndYearName = `${this.months[this.currentMonth]} ${this.currentYear}`; + this.markCurrentDayOfWeek(); + this.buildMonthCalendar(this.monthsShort); + this.getUserHabits(true, this.calendarDay); + }, 0); }); } diff --git a/src/app/main/component/user/components/profile/eco-places/eco-places.component.scss b/src/app/main/component/user/components/profile/eco-places/eco-places.component.scss index c18040436a..8f5b17edb4 100644 --- a/src/app/main/component/user/components/profile/eco-places/eco-places.component.scss +++ b/src/app/main/component/user/components/profile/eco-places/eco-places.component.scss @@ -3,7 +3,7 @@ $bp-smallest: 320px; $bp-phone: 576px; $bp-tablet: 768px; $bp-desktop: 1024px; -$bp-largest: 1440px; +$bp-largest: 1199px; $grey: var(--tertiary-light-grey); .eco-places-content { diff --git a/src/app/main/component/user/components/profile/profile-widget/profile-progress/profile-progress.component.scss b/src/app/main/component/user/components/profile/profile-widget/profile-progress/profile-progress.component.scss index a674369925..bd81da5d5a 100644 --- a/src/app/main/component/user/components/profile/profile-widget/profile-progress/profile-progress.component.scss +++ b/src/app/main/component/user/components/profile/profile-widget/profile-progress/profile-progress.component.scss @@ -82,7 +82,7 @@ p { } } -@media (min-width: 1440px) { +@media (min-width: 1200px) { .stat { width: 213px; column-gap: 16px; diff --git a/src/app/main/component/user/components/profile/shopping-list/shopping-list.component.scss b/src/app/main/component/user/components/profile/shopping-list/shopping-list.component.scss index 5c7ccdf6f8..9a40e93879 100644 --- a/src/app/main/component/user/components/profile/shopping-list/shopping-list.component.scss +++ b/src/app/main/component/user/components/profile/shopping-list/shopping-list.component.scss @@ -2,7 +2,7 @@ $bp-smallest: 320px; $bp-phone: 576px; $bp-tablet: 768px; $bp-desktop: 1080px; -$bp-largest: 1440px; +$bp-largest: 1199px; .outer { background-color: var(--primary-white); diff --git a/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.html b/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.html index 22255b7f8e..b82e353cd0 100644 --- a/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.html +++ b/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.html @@ -2,12 +2,14 @@
-

+

{{ 'profile.my-achievements' | translate }}

+
+
+
15 {{ 'profile.achieved' | translate }}
{{ 'profile.see-all' | translate }}
-
15 {{ 'profile.achieved' | translate }}
achievement diff --git a/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.scss b/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.scss index 8bb2f43a4d..a8bff93ccb 100644 --- a/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.scss +++ b/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.scss @@ -32,13 +32,15 @@ p { line-height: 24px; color: var(--primary-dark-grey); } + } - a:nth-child(2) { - font-weight: 400; - font-size: 12px; - color: var(--tertiary-light-grey); - line-height: 16px; - } + a:nth-child(2) { + font-weight: 400; + font-size: 12px; + color: var(--tertiary-light-grey); + line-height: 16px; + position: relative; + bottom: 20px; } } @@ -62,13 +64,21 @@ p { } } -@media (min-width: 768px) and (max-width: 1439px) { +@media (min-width: 768px) and (max-width: 1199px) { .outer { height: 132px; .achievements { width: 184px; + .header { + a:nth-child(2) { + text-align: center; + top: 0px; + width: 80px; + } + } + .body img { height: 48px; } diff --git a/src/app/main/component/user/components/profile/users-friends/users-friends.component.scss b/src/app/main/component/user/components/profile/users-friends/users-friends.component.scss index 4456008250..6d193c01d8 100644 --- a/src/app/main/component/user/components/profile/users-friends/users-friends.component.scss +++ b/src/app/main/component/user/components/profile/users-friends/users-friends.component.scss @@ -128,7 +128,7 @@ p { } } -@media (min-width: 768px) and (max-width: 1439px) { +@media (min-width: 768px) and (max-width: 1199px) { .outer { .friends { width: 184px; @@ -145,5 +145,34 @@ p { height: 48px; } } + div { + p:nth-child(2) { + position: relative; + bottom: 1px; + right: 5px; + } + } + } +} + +@media (min-width: 1199px) and (max-width: 1439px) { + .outer { + .friends { + .friends-images { + div { + position: relative; + top: 6px; + left: 5px; + scale: 116%; + + p:nth-child(2) { + position: relative; + bottom: 1px; + right: 5px; + scale: 87%; + } + } + } + } } } From 5d09d34995737d63ed3c776bfbc8fa1fa951020f Mon Sep 17 00:00:00 2001 From: Pavlo Sobkiv Date: Fri, 22 Sep 2023 01:18:58 +0300 Subject: [PATCH 2/6] Corrected CSS to My place page. Corrected localization for pop-up of habits in progress --- .../users-achievements/users-achievements.component.scss | 2 +- .../profile/users-friends/users-friends.component.scss | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.scss b/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.scss index a8bff93ccb..e91e05606b 100644 --- a/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.scss +++ b/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.scss @@ -74,7 +74,7 @@ p { .header { a:nth-child(2) { text-align: center; - top: 0px; + bottom: 1px; width: 80px; } } diff --git a/src/app/main/component/user/components/profile/users-friends/users-friends.component.scss b/src/app/main/component/user/components/profile/users-friends/users-friends.component.scss index 6d193c01d8..cb48cd9c4d 100644 --- a/src/app/main/component/user/components/profile/users-friends/users-friends.component.scss +++ b/src/app/main/component/user/components/profile/users-friends/users-friends.component.scss @@ -145,6 +145,7 @@ p { height: 48px; } } + div { p:nth-child(2) { position: relative; From 0e1ee576030017b38a2a252a8c5b0fb5696a26fa Mon Sep 17 00:00:00 2001 From: Pavlo Sobkiv Date: Fri, 22 Sep 2023 01:28:23 +0300 Subject: [PATCH 3/6] Fixed bug --- .../users-achievements/users-achievements.component.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.scss b/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.scss index e91e05606b..f39ed2bb8c 100644 --- a/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.scss +++ b/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.scss @@ -73,7 +73,7 @@ p { .header { a:nth-child(2) { - text-align: center; + text-align: right; bottom: 1px; width: 80px; } From 4c3fb9013a915a5d6b17342009c9d5a55c9bd7dd Mon Sep 17 00:00:00 2001 From: Pavlo Sobkiv Date: Mon, 25 Sep 2023 00:38:34 +0300 Subject: [PATCH 4/6] Changed approach to positioning div { --- .../user/components/profile/profile.component.html | 2 +- .../user/components/profile/profile.component.ts | 7 ++++++- .../users-achievements.component.html | 3 ++- .../users-achievements.component.scss | 13 +++++++++---- .../users-achievements.component.ts | 3 ++- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/app/main/component/user/components/profile/profile.component.html b/src/app/main/component/user/components/profile/profile.component.html index c3304472bf..d84d59f5c6 100644 --- a/src/app/main/component/user/components/profile/profile.component.html +++ b/src/app/main/component/user/components/profile/profile.component.html @@ -1,7 +1,7 @@
- + diff --git a/src/app/main/component/user/components/profile/profile.component.ts b/src/app/main/component/user/components/profile/profile.component.ts index e261fb293a..790eca8ba5 100644 --- a/src/app/main/component/user/components/profile/profile.component.ts +++ b/src/app/main/component/user/components/profile/profile.component.ts @@ -14,6 +14,7 @@ import { take } from 'rxjs/operators'; styleUrls: ['./profile.component.scss'] }) export class ProfileComponent implements OnInit, OnDestroy { + public currLang: string; private langChangeSub: Subscription; public userInfo: EditProfileModel; public isDesktopWidth: boolean; @@ -34,6 +35,7 @@ export class ProfileComponent implements OnInit, OnDestroy { this.subscribeToLangChange(); this.bindLang(this.localStorageService.getCurrentLanguage()); this.checkUserActivities(); + console.log(this.translate); } @HostListener('window:resize') public checkDisplayWidth() { @@ -59,7 +61,10 @@ export class ProfileComponent implements OnInit, OnDestroy { } private subscribeToLangChange(): void { - this.langChangeSub = this.localStorageService.languageSubject.subscribe((lang) => this.bindLang(lang)); + this.langChangeSub = this.localStorageService.languageSubject.subscribe((lang) => { + this.bindLang(lang); + this.currLang = lang; + }); } private checkUserActivities(): void { diff --git a/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.html b/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.html index b82e353cd0..da8942db36 100644 --- a/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.html +++ b/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.html @@ -5,10 +5,11 @@

{{ 'profile.my-achievements' | translate }}

+ {{ 'profile.see-all' | translate }}
15 {{ 'profile.achieved' | translate }}
- {{ 'profile.see-all' | translate }} + {{ 'profile.see-all' | translate }}
diff --git a/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.scss b/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.scss index f39ed2bb8c..7f1bf2c42a 100644 --- a/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.scss +++ b/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.scss @@ -40,6 +40,11 @@ p { color: var(--tertiary-light-grey); line-height: 16px; position: relative; + } + } + + div { + .see-all-ukr { bottom: 20px; } } @@ -72,10 +77,10 @@ p { width: 184px; .header { - a:nth-child(2) { - text-align: right; - bottom: 1px; - width: 80px; + div { + .see-all-ukr { + bottom: 0px; + } } } diff --git a/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.ts b/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.ts index 0e80a02f3d..751cfce14a 100644 --- a/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.ts +++ b/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, Input } from '@angular/core'; import { PROFILE_IMAGES } from 'src/app/main/image-pathes/profile-images'; @Component({ @@ -8,4 +8,5 @@ import { PROFILE_IMAGES } from 'src/app/main/image-pathes/profile-images'; }) export class UsersAchievementsComponent { public achievementsImages = PROFILE_IMAGES.achs; + @Input() currLang: string; } From 302ebd2ebd8233b954c73aa0d997c0794f53bbb6 Mon Sep 17 00:00:00 2001 From: Pavlo Sobkiv Date: Mon, 25 Sep 2023 00:48:56 +0300 Subject: [PATCH 5/6] Removed console --- .../user/components/profile/profile.component.ts | 1 - .../users-achievements.component.scss | 12 +++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/app/main/component/user/components/profile/profile.component.ts b/src/app/main/component/user/components/profile/profile.component.ts index 790eca8ba5..400b6611b7 100644 --- a/src/app/main/component/user/components/profile/profile.component.ts +++ b/src/app/main/component/user/components/profile/profile.component.ts @@ -35,7 +35,6 @@ export class ProfileComponent implements OnInit, OnDestroy { this.subscribeToLangChange(); this.bindLang(this.localStorageService.getCurrentLanguage()); this.checkUserActivities(); - console.log(this.translate); } @HostListener('window:resize') public checkDisplayWidth() { diff --git a/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.scss b/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.scss index 7f1bf2c42a..76f43136c4 100644 --- a/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.scss +++ b/src/app/main/component/user/components/profile/users-achievements/users-achievements.component.scss @@ -32,6 +32,10 @@ p { line-height: 24px; color: var(--primary-dark-grey); } + + .see-all-ukr { + bottom: 20px; + } } a:nth-child(2) { @@ -43,12 +47,6 @@ p { } } - div { - .see-all-ukr { - bottom: 20px; - } - } - .acheived-quantity { font-weight: 400; font-size: 10px; @@ -79,7 +77,7 @@ p { .header { div { .see-all-ukr { - bottom: 0px; + bottom: -1px; } } } From 9e3c1b1cfcc08dd806e55a8d870c8f967e800dc4 Mon Sep 17 00:00:00 2001 From: Pavlo Sobkiv Date: Mon, 25 Sep 2023 01:10:56 +0300 Subject: [PATCH 6/6] Changed 'delete' botton to green color when you try to delete an event --- .../components/events-list-item/events-list-item.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/main/component/shared/components/events-list-item/events-list-item.component.ts b/src/app/main/component/shared/components/events-list-item/events-list-item.component.ts index c21352d0f5..9e5d286a7d 100644 --- a/src/app/main/component/shared/components/events-list-item/events-list-item.component.ts +++ b/src/app/main/component/shared/components/events-list-item/events-list-item.component.ts @@ -78,7 +78,7 @@ export class EventsListItemComponent implements OnChanges, OnInit, OnDestroy { popupTitle: 'homepage.events.delete-title', popupConfirm: 'homepage.events.delete-yes', popupCancel: 'homepage.events.delete-no', - style: 'red' + style: 'green' }; public canUserJoinCloseEvent: boolean;