From c0838d5d100d17d2056f8a3dce4dcda588179427 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 30 Jan 2021 21:52:32 +0200 Subject: Added a message to user profiles, when the user hasn't posted anything --- .../src/app/components/profile/profile.component.css | 8 +++++++- .../src/app/components/profile/profile.component.html | 3 +++ .../src/app/components/profile/profile.component.ts | 3 +++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/DevHive.Angular/src/app/components/profile/profile.component.css b/src/DevHive.Angular/src/app/components/profile/profile.component.css index 3f9ede3..f312ebd 100644 --- a/src/DevHive.Angular/src/app/components/profile/profile.component.css +++ b/src/DevHive.Angular/src/app/components/profile/profile.component.css @@ -76,7 +76,13 @@ hr { /* Posts */ -#posts { +#no-posts { width: 100%; + text-align: center; + color: gray; + margin-top: .2em; } +#posts { + width: 100%; +} diff --git a/src/DevHive.Angular/src/app/components/profile/profile.component.html b/src/DevHive.Angular/src/app/components/profile/profile.component.html index e20f380..ebb9ec8 100644 --- a/src/DevHive.Angular/src/app/components/profile/profile.component.html +++ b/src/DevHive.Angular/src/app/components/profile/profile.component.html @@ -43,6 +43,9 @@
+
+ {{ user.firstName }} {{ user.lastName }} hasn't posted anything yet! +
diff --git a/src/DevHive.Angular/src/app/components/profile/profile.component.ts b/src/DevHive.Angular/src/app/components/profile/profile.component.ts index d9f94e8..7717505 100644 --- a/src/DevHive.Angular/src/app/components/profile/profile.component.ts +++ b/src/DevHive.Angular/src/app/components/profile/profile.component.ts @@ -81,6 +81,9 @@ export class ProfileComponent implements OnInit { (result: object) => { this.userPosts = Object.values(result)[0]; this.finishUserLoading(); + }, + (err: HttpErrorResponse) => { + this.finishUserLoading(); } ); } -- cgit v1.2.3