aboutsummaryrefslogtreecommitdiff
path: root/src/app/components
diff options
context:
space:
mode:
authorDanail Dimitrov <danaildimitrov321@gmail.com>2021-03-06 14:43:32 +0200
committerDanail Dimitrov <danaildimitrov321@gmail.com>2021-03-06 14:43:32 +0200
commit1f008dfc777022582e5e0cf0823175e66c2790cf (patch)
treed6564e3aa209a7f9a1600bed4ae4187c587945ab /src/app/components
parentd8ffe52b67e983b9b317b2e5dcb138ac996eaa31 (diff)
downloadDevHive-Angular-1f008dfc777022582e5e0cf0823175e66c2790cf.tar
DevHive-Angular-1f008dfc777022582e5e0cf0823175e66c2790cf.tar.gz
DevHive-Angular-1f008dfc777022582e5e0cf0823175e66c2790cf.zip
starting development of rating system
Diffstat (limited to 'src/app/components')
-rw-r--r--src/app/components/post/post.component.css5
-rw-r--r--src/app/components/post/post.component.html2
-rw-r--r--src/app/components/post/post.component.ts7
3 files changed, 7 insertions, 7 deletions
diff --git a/src/app/components/post/post.component.css b/src/app/components/post/post.component.css
index 1b88c7d..07d931f 100644
--- a/src/app/components/post/post.component.css
+++ b/src/app/components/post/post.component.css
@@ -76,11 +76,6 @@ hr {
/* Rating */
-/* Temporary, until ratings are implemented fully */
-.rating {
- display: none !important;
-}
-
.rating {
display: flex;
flex-direction: column;
diff --git a/src/app/components/post/post.component.html b/src/app/components/post/post.component.html
index 4ba4d43..4584591 100644
--- a/src/app/components/post/post.component.html
+++ b/src/app/components/post/post.component.html
@@ -30,7 +30,7 @@
</div>
</section>
<section class="rating">
- <button class="vote">
+ <button class="vote" (click)="upVotePost()">
</button>
<summary class="score">
diff --git a/src/app/components/post/post.component.ts b/src/app/components/post/post.component.ts
index 387f56f..39391ad 100644
--- a/src/app/components/post/post.component.ts
+++ b/src/app/components/post/post.component.ts
@@ -2,6 +2,7 @@ import { Component, Input, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { Guid } from 'guid-typescript';
import { PostService } from 'src/app/services/post.service';
+import { RatingService } from 'src/app/services/rating.service';
import { UserService } from 'src/app/services/user.service';
import { User } from 'src/models/identity/user';
import { Post } from 'src/models/post';
@@ -19,7 +20,7 @@ export class PostComponent implements OnInit {
public timeCreated: string;
@Input() paramId: string;
- constructor(private _postService: PostService, private _userService: UserService, private _router: Router)
+ constructor(private _postService: PostService, private _ratingServe: RatingService, private _userService: UserService, private _router: Router)
{ }
ngOnInit(): void {
@@ -54,4 +55,8 @@ export class PostComponent implements OnInit {
goToPostPage(): void {
this._router.navigate(['/post/' + this.post.postId]);
}
+
+ upVotePost(): void {
+
+ }
}