Add verified, hearted, pinned, and likes to comments.

This commit is contained in:
FireMasterK 2021-05-27 00:32:12 +05:30
parent 526eefc18c
commit ff32af1e96
No known key found for this signature in database
GPG key ID: 8DFF5DD33E93DB58
2 changed files with 16 additions and 4 deletions

View file

@ -44,6 +44,10 @@
v-for="comment in comments.comments" v-for="comment in comments.comments"
> >
<div align="left"> <div align="left">
<div v-if="comment.pinned">
<font-awesome-icon icon="thumbtack"></font-awesome-icon>&nbsp; Pinned by
{{ video.uploader }}
</div>
<img <img
:src="comment.thumbnail" :src="comment.thumbnail"
style="width: calc(100% * 1 / 20)" style="width: calc(100% * 1 / 20)"
@ -52,11 +56,19 @@
loading="lazy" loading="lazy"
alt="avatar" alt="avatar"
/> />
<br />
<router-link class="uk-link-muted" v-bind:to="comment.commentorUrl"> <router-link class="uk-link-muted" v-bind:to="comment.commentorUrl">
<p>{{ comment.author }}</p> {{ comment.author }} </router-link
</router-link> >&thinsp;<font-awesome-icon v-if="comment.verified" icon="check"></font-awesome-icon>
</div> </div>
<p>{{ comment.commentText }}</p> <p>{{ comment.commentText }}</p>
<div>
<b>{{ comment.likeCount }}</b>
&nbsp;
<font-awesome-icon icon="thumbs-up"></font-awesome-icon>
&nbsp;
<font-awesome-icon v-if="comment.hearted" icon="heart"></font-awesome-icon>
</div>
<hr /> <hr />
</div> </div>
</div> </div>

View file

@ -1,9 +1,9 @@
import { createApp } from "vue"; import { createApp } from "vue";
import { library } from "@fortawesome/fontawesome-svg-core"; import { library } from "@fortawesome/fontawesome-svg-core";
import { faThumbsUp, faThumbsDown, faEye } from "@fortawesome/free-solid-svg-icons"; import { faThumbsUp, faThumbsDown, faEye, faThumbtack, faCheck, faHeart } from "@fortawesome/free-solid-svg-icons";
import { faGithub, faBitcoin } from "@fortawesome/free-brands-svg-icons"; import { faGithub, faBitcoin } from "@fortawesome/free-brands-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
library.add(faThumbsUp, faThumbsDown, faEye, faGithub, faBitcoin); library.add(faThumbsUp, faThumbsDown, faEye, faGithub, faBitcoin, faThumbtack, faCheck, faHeart);
import("uikit/dist/css/uikit-core.css"); import("uikit/dist/css/uikit-core.css");
import("uikit/dist/js/uikit-core.min"); import("uikit/dist/js/uikit-core.min");