From 611e7e9dd85b9c515ab990bd6a08a98757fd8319 Mon Sep 17 00:00:00 2001 From: Jonas Wunderlich Date: Sat, 26 Mar 2022 20:13:33 +0100 Subject: [PATCH] Changed icon to checkmark and for verified author to checkmark-circle --- src/invidious/comments.cr | 6 ++++-- src/invidious/views/channel.ecr | 2 +- src/invidious/views/community.ecr | 2 +- src/invidious/views/components/item.ecr | 6 +++--- src/invidious/views/playlists.ecr | 2 +- src/invidious/views/watch.ecr | 6 +++--- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/invidious/comments.cr b/src/invidious/comments.cr index d94f213f4..54cede370 100644 --- a/src/invidious/comments.cr +++ b/src/invidious/comments.cr @@ -331,8 +331,10 @@ def template_youtube_comments(comments, locale, thin_mode, is_replies = false) end author_name = HTML.escape(child["author"].as_s) - if child["verified"]?.try &.as_bool - author_name += " " + if child["verified"]?.try &.as_bool && child["authorIsChannelOwner"]?.try &.as_bool + author_name += " " + elsif child["verified"]?.try &.as_bool + author_name += " " end html << <<-END_HTML
diff --git a/src/invidious/views/channel.ecr b/src/invidious/views/channel.ecr index 92f81ee49..d6e653b45 100644 --- a/src/invidious/views/channel.ecr +++ b/src/invidious/views/channel.ecr @@ -20,7 +20,7 @@
- <%= author %><% if !channel.verified.nil? && channel.verified %> <% end %> + <%= author %><% if !channel.verified.nil? && channel.verified %> <% end %>
diff --git a/src/invidious/views/community.ecr b/src/invidious/views/community.ecr index 3bc29e552..6b8ccd925 100644 --- a/src/invidious/views/community.ecr +++ b/src/invidious/views/community.ecr @@ -19,7 +19,7 @@
- <%= author %><% if !channel.verified.nil? && channel.verified %> <% end %> + <%= author %><% if !channel.verified.nil? && channel.verified %> <% end %>
diff --git a/src/invidious/views/components/item.ecr b/src/invidious/views/components/item.ecr index cc4ded745..86038f28d 100644 --- a/src/invidious/views/components/item.ecr +++ b/src/invidious/views/components/item.ecr @@ -8,7 +8,7 @@ "/> <% end %> -

<%= HTML.escape(item.author) %><% if !item.author_verified.nil? && item.author_verified %> <% end %>

+

<%= HTML.escape(item.author) %><% if !item.author_verified.nil? && item.author_verified %> <% end %>

<%= translate_count(locale, "generic_subscribers_count", item.subscriber_count, NumberFormatting::Separator) %>

<% if !item.auto_generated %>

<%= translate_count(locale, "generic_videos_count", item.video_count, NumberFormatting::Separator) %>

<% end %> @@ -30,7 +30,7 @@

<%= HTML.escape(item.title) %>

-

<%= HTML.escape(item.author) %><% if !item.is_a?(InvidiousPlaylist) && !item.author_verified.nil? && item.author_verified %> <% end %>

+

<%= HTML.escape(item.author) %><% if !item.is_a?(InvidiousPlaylist) && !item.author_verified.nil? && item.author_verified %> <% end %>

<% when MixVideo %> @@ -142,7 +142,7 @@
<% endpoint_params = "?v=#{item.id}" %> diff --git a/src/invidious/views/playlists.ecr b/src/invidious/views/playlists.ecr index c8718e7b7..87e0c75de 100644 --- a/src/invidious/views/playlists.ecr +++ b/src/invidious/views/playlists.ecr @@ -19,7 +19,7 @@
- <%= author %><% if !channel.verified.nil? && channel.verified %> <% end %> + <%= author %><% if !channel.verified.nil? && channel.verified %> <% end %>
diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr index 74a5e69f3..d79c6dc8d 100644 --- a/src/invidious/views/watch.ecr +++ b/src/invidious/views/watch.ecr @@ -206,7 +206,7 @@ we're going to need to do it here in order to allow for translations. <% if !video.author_thumbnail.empty? %> <% end %> - <%= author %><% if !video.author_verified.nil? && video.author_verified %> <% end %> + <%= author %><% if !video.author_verified.nil? && video.author_verified %> <% end %>
@@ -280,9 +280,9 @@ we're going to need to do it here in order to allow for translations.
<% if rv["ucid"]? %> - "><%= rv["author"]? %><% if rv["author_verified"]? == "true" %> <% end %> + "><%= rv["author"]? %><% if rv["author_verified"]? == "true" %> <% end %> <% else %> - <%= rv["author"]? %><% if rv["author_verified"]? == "true" %> <% end %> + <%= rv["author"]? %><% if rv["author_verified"]? == "true" %> <% end %> <% end %>