diff --git a/src/app/components/feed/postlist/postlist.component.ts b/src/app/components/feed/postlist/postlist.component.ts index c5e4f52..bcb3afe 100644 --- a/src/app/components/feed/postlist/postlist.component.ts +++ b/src/app/components/feed/postlist/postlist.component.ts @@ -21,12 +21,16 @@ export class PostlistComponent implements OnInit { voteUp(pPost: Post) { this.feedService.upvote(pPost.id).subscribe(response => { - this.voteEvent.emit(true); }); + // this.voteEvent.emit(true); + pPost.userVote = response.json().data.vote; + }); } voteDown(pPost: Post) { this.feedService.downvote(pPost.id).subscribe(response => { - this.voteEvent.emit(true); }); + // this.voteEvent.emit(true); + pPost.userVote = response.json().data.vote; + }); } deletePost(pPost: Post) { diff --git a/src/app/components/group/group.component.html b/src/app/components/group/group.component.html index 55dfe65..d46c241 100644 --- a/src/app/components/group/group.component.html +++ b/src/app/components/group/group.component.html @@ -1,6 +1,30 @@
- + + + +
+ {{groupProfile.name}} + +
+ +
+ created by {{groupProfile.creator.username}} @{{groupProfile.creator.handle}} +
+
+ +
+ {{groupProfile.members.length}} member(s) +
+
+
+ +
{{groupProfile.name}} @@ -13,7 +37,7 @@
-
+
{{groupProfile.members.length}} member(s)
diff --git a/src/app/components/group/group.component.sass b/src/app/components/group/group.component.sass index 335d7d1..66f78e9 100644 --- a/src/app/components/group/group.component.sass +++ b/src/app/components/group/group.component.sass @@ -6,6 +6,7 @@ width: 100% height: calc(100% - 56px) overflow: scroll + overflow-x: hidden #profile padding: 2em @@ -27,7 +28,7 @@ margin-top: 32px .mat-toolbar-row max-height: 40px - #info-box + .info-box font-size: 14px margin-left: calc(100px + 0.5em) .info diff --git a/src/app/components/profile/profile.component.html b/src/app/components/profile/profile.component.html index b791d85..12bad54 100644 --- a/src/app/components/profile/profile.component.html +++ b/src/app/components/profile/profile.component.html @@ -1,6 +1,41 @@
- + + + +
+ {{userProfile.username}} + +
+ +
+ @{{userProfile.handle}} +
+
+ +
+ {{rankname}} ({{userProfile.points}} points) +
+
+ +
+ {{userProfile.friendCount}} friends + {{userProfile.groupCount}} groups +
+
+ +
+ joined on {{userProfile.joinedAt}} +
+
+
+ +
{{userProfile.username}} @@ -13,7 +48,7 @@
-
+
{{rankname}} ({{userProfile.points}} points) {{userProfile.friendCount}} friends {{userProfile.groupCount}} groups diff --git a/src/app/components/profile/profile.component.sass b/src/app/components/profile/profile.component.sass index 335d7d1..9acedb2 100644 --- a/src/app/components/profile/profile.component.sass +++ b/src/app/components/profile/profile.component.sass @@ -6,6 +6,7 @@ width: 100% height: calc(100% - 56px) overflow: scroll + overflow-x: hidden #profile padding: 2em @@ -27,11 +28,12 @@ margin-top: 32px .mat-toolbar-row max-height: 40px - #info-box + .info-box font-size: 14px margin-left: calc(100px + 0.5em) - .info - margin-right: 3em + .info + margin-right: 1em + font-size: 14px #username margin: 0 0.5em #handle