aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Angular
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2021-01-30 21:52:32 +0200
committerSyndamia <kamen.d.mladenov@protonmail.com>2021-01-30 21:52:32 +0200
commitc0838d5d100d17d2056f8a3dce4dcda588179427 (patch)
tree8650d10c80505d2f5208eed9caf9ae949f65b17b /src/DevHive.Angular
parentcc46a2fb619faf8f3227d3861c770fb3fbb546f0 (diff)
downloadDevHive-c0838d5d100d17d2056f8a3dce4dcda588179427.tar
DevHive-c0838d5d100d17d2056f8a3dce4dcda588179427.tar.gz
DevHive-c0838d5d100d17d2056f8a3dce4dcda588179427.zip
Added a message to user profiles, when the user hasn't posted anything
Diffstat (limited to 'src/DevHive.Angular')
-rw-r--r--src/DevHive.Angular/src/app/components/profile/profile.component.css8
-rw-r--r--src/DevHive.Angular/src/app/components/profile/profile.component.html3
-rw-r--r--src/DevHive.Angular/src/app/components/profile/profile.component.ts3
3 files changed, 13 insertions, 1 deletions
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 @@
</div>
<hr>
<div id="posts" class="scroll-standalone">
+ <div id="no-posts" *ngIf="userPosts.length === 0">
+ {{ user.firstName }} {{ user.lastName }} hasn't posted anything yet!
+ </div>
<div *ngFor="let userPost of userPosts">
<app-post [paramId]="userPost.postId.toString()"></app-post>
</div>
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();
}
);
}