Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add subscribed icon to comments #4007

Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@
height: 14px;
}

.commentSubscribedIcon {
content: var(--logo-icon);
height: 10px;
width: 10px;
Benjababe marked this conversation as resolved.
Show resolved Hide resolved
margin-left: 0.25em;
margin-right: 0.25em;
}

.commentLikeCount {
font-size: 11px;
margin-left: 70px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ export default defineComponent({
canPerformMoreCommentLoading: function () {
return this.commentData.length > 0 && !this.isLoading && this.showComments && this.nextPageToken
},

subscriptions: function() {
return this.$store.getters.getActiveProfile.subscriptions
}
},
mounted: function () {
// region No comment detection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@
class="commentMemberIcon"
alt=""
>
<img
v-if="subscriptions.find((channel) => channel.id === comment.authorId)"
:title="$t('Comments.Subscribed')"
:aria-label="$t('Comments.Subscribed')"
class="commentSubscribedIcon"
alt=""
>
<span class="commentDate">
{{ comment.time }}
</span>
Expand Down Expand Up @@ -209,6 +216,13 @@
class="commentMemberIcon"
alt=""
>
<img
v-if="subscriptions.find((channel) => channel.id === reply.authorId)"
:title="$t('Comments.Subscribed')"
:aria-label="$t('Comments.Subscribed')"
class="commentSubscribedIcon"
alt=""
>
<span class="commentDate">
{{ reply.time }}
</span>
Expand Down
1 change: 1 addition & 0 deletions src/renderer/helpers/api/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,7 @@ export function parseLocalComment(comment, commentThread = undefined) {
dataType: 'local',
authorLink: comment.author.id,
author: comment.author.name,
authorId: comment.author.id,
authorThumb: comment.author.best_thumbnail.url,
isPinned: comment.is_pinned,
isOwner: comment.author_is_channel_owner,
Expand Down
1 change: 1 addition & 0 deletions static/locales/en-US.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,7 @@ Comments:
No more comments available: No more comments available
Pinned by: Pinned by
Member: Member
Subscribed: Subscribed
Hearted: Hearted
Up Next: Up Next

Expand Down