From ee92f6c6397065334aaa34f33a671372b647673f Mon Sep 17 00:00:00 2001 From: Benjababe Date: Fri, 8 Sep 2023 15:47:43 +0800 Subject: [PATCH 1/7] add subscribed icon to comments --- .../watch-video-comments/watch-video-comments.css | 8 ++++++++ .../watch-video-comments/watch-video-comments.js | 4 ++++ .../watch-video-comments/watch-video-comments.vue | 8 ++++++++ static/locales/en-US.yaml | 1 + 4 files changed, 21 insertions(+) diff --git a/src/renderer/components/watch-video-comments/watch-video-comments.css b/src/renderer/components/watch-video-comments/watch-video-comments.css index d821bd7cd2ba8..b92f5adedbe67 100644 --- a/src/renderer/components/watch-video-comments/watch-video-comments.css +++ b/src/renderer/components/watch-video-comments/watch-video-comments.css @@ -117,6 +117,14 @@ height: 14px; } +.commentSubscribedIcon { + content: url("../../../../_icons/iconColorSmall.png"); + height: 10px; + width: 10px; + margin-left: 0.25em; + margin-right: 0.25em; +} + .commentLikeCount { font-size: 11px; margin-left: 70px; diff --git a/src/renderer/components/watch-video-comments/watch-video-comments.js b/src/renderer/components/watch-video-comments/watch-video-comments.js index 00aef08c0c083..4099b1286250f 100644 --- a/src/renderer/components/watch-video-comments/watch-video-comments.js +++ b/src/renderer/components/watch-video-comments/watch-video-comments.js @@ -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 diff --git a/src/renderer/components/watch-video-comments/watch-video-comments.vue b/src/renderer/components/watch-video-comments/watch-video-comments.vue index 7eac90e7c80d8..22640f2bb28ee 100644 --- a/src/renderer/components/watch-video-comments/watch-video-comments.vue +++ b/src/renderer/components/watch-video-comments/watch-video-comments.vue @@ -107,6 +107,14 @@ class="commentMemberIcon" alt="" > + {{ comment.time }} diff --git a/static/locales/en-US.yaml b/static/locales/en-US.yaml index 52b4f1595c7b9..ee44b7c8ba163 100644 --- a/static/locales/en-US.yaml +++ b/static/locales/en-US.yaml @@ -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 From 532d8d80340bd5059bb46ebcefeda9305e0f4a8c Mon Sep 17 00:00:00 2001 From: Benjababe Date: Fri, 8 Sep 2023 15:56:36 +0800 Subject: [PATCH 2/7] update subscribed img src --- .../components/watch-video-comments/watch-video-comments.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/components/watch-video-comments/watch-video-comments.vue b/src/renderer/components/watch-video-comments/watch-video-comments.vue index 22640f2bb28ee..c4a6a9db06b82 100644 --- a/src/renderer/components/watch-video-comments/watch-video-comments.vue +++ b/src/renderer/components/watch-video-comments/watch-video-comments.vue @@ -109,9 +109,9 @@ > From 28e3296c82826cd5f10e1bc09f48eef7327c2521 Mon Sep 17 00:00:00 2001 From: Benjababe Date: Fri, 8 Sep 2023 15:57:21 +0800 Subject: [PATCH 3/7] update subscribed icon css --- .../components/watch-video-comments/watch-video-comments.css | 1 - 1 file changed, 1 deletion(-) diff --git a/src/renderer/components/watch-video-comments/watch-video-comments.css b/src/renderer/components/watch-video-comments/watch-video-comments.css index b92f5adedbe67..1567bfec59287 100644 --- a/src/renderer/components/watch-video-comments/watch-video-comments.css +++ b/src/renderer/components/watch-video-comments/watch-video-comments.css @@ -118,7 +118,6 @@ } .commentSubscribedIcon { - content: url("../../../../_icons/iconColorSmall.png"); height: 10px; width: 10px; margin-left: 0.25em; From bad11f6d7b8cc08e66b6a80bce381b52f141bda4 Mon Sep 17 00:00:00 2001 From: Benjababe Date: Fri, 8 Sep 2023 19:32:46 +0800 Subject: [PATCH 4/7] add author id to local api comments --- src/renderer/helpers/api/local.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/renderer/helpers/api/local.js b/src/renderer/helpers/api/local.js index 12be58023e547..95fdf4afbcc38 100644 --- a/src/renderer/helpers/api/local.js +++ b/src/renderer/helpers/api/local.js @@ -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, From 71e65b65c6370173fc98c9322c8f61f6a9c222d5 Mon Sep 17 00:00:00 2001 From: Benjababe Date: Fri, 8 Sep 2023 19:35:34 +0800 Subject: [PATCH 5/7] update subscribe icon on theme change --- .../components/watch-video-comments/watch-video-comments.css | 1 + .../components/watch-video-comments/watch-video-comments.vue | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/components/watch-video-comments/watch-video-comments.css b/src/renderer/components/watch-video-comments/watch-video-comments.css index 1567bfec59287..0295b372defb9 100644 --- a/src/renderer/components/watch-video-comments/watch-video-comments.css +++ b/src/renderer/components/watch-video-comments/watch-video-comments.css @@ -118,6 +118,7 @@ } .commentSubscribedIcon { + content: var(--logo-icon); height: 10px; width: 10px; margin-left: 0.25em; diff --git a/src/renderer/components/watch-video-comments/watch-video-comments.vue b/src/renderer/components/watch-video-comments/watch-video-comments.vue index c4a6a9db06b82..3dc02ff8973f5 100644 --- a/src/renderer/components/watch-video-comments/watch-video-comments.vue +++ b/src/renderer/components/watch-video-comments/watch-video-comments.vue @@ -111,7 +111,6 @@ v-if="subscriptions.find((channel) => channel.id === comment.authorId)" :title="$t('Comments.Subscribed')" :aria-label="$t('Comments.Subscribed')" - src="../../../../_icons/iconColorSmall.png" class="commentSubscribedIcon" alt="" > From cd6622e101551d3ac7426b06d8dd4c336f5e9381 Mon Sep 17 00:00:00 2001 From: Benjababe Date: Sat, 9 Sep 2023 00:39:06 +0800 Subject: [PATCH 6/7] add subscription icon to comment replies --- .../watch-video-comments/watch-video-comments.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/renderer/components/watch-video-comments/watch-video-comments.vue b/src/renderer/components/watch-video-comments/watch-video-comments.vue index 3dc02ff8973f5..071fc1e80c30a 100644 --- a/src/renderer/components/watch-video-comments/watch-video-comments.vue +++ b/src/renderer/components/watch-video-comments/watch-video-comments.vue @@ -216,6 +216,13 @@ class="commentMemberIcon" alt="" > + {{ reply.time }} From 4469a6738f13276ca7ef667b5b9f4f51b19b543e Mon Sep 17 00:00:00 2001 From: Benjababe Date: Sun, 10 Sep 2023 09:31:28 +0800 Subject: [PATCH 7/7] Update src/renderer/components/watch-video-comments/watch-video-comments.css Co-authored-by: absidue <48293849+absidue@users.noreply.github.com> --- .../components/watch-video-comments/watch-video-comments.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/watch-video-comments/watch-video-comments.css b/src/renderer/components/watch-video-comments/watch-video-comments.css index 0295b372defb9..c6e6a11fbb625 100644 --- a/src/renderer/components/watch-video-comments/watch-video-comments.css +++ b/src/renderer/components/watch-video-comments/watch-video-comments.css @@ -119,8 +119,9 @@ .commentSubscribedIcon { content: var(--logo-icon); - height: 10px; - width: 10px; + height: 14px; + width: 14px; + vertical-align: middle; margin-left: 0.25em; margin-right: 0.25em; }