Skip to content

Commit f8b2967

Browse files
committed
Gave them marks some space and added nil checks
1 parent fe55141 commit f8b2967

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

src/invidious/comments.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ def template_youtube_comments(comments, locale, thin_mode, is_replies = false)
330330

331331
author_name = HTML.escape(child["author"].as_s)
332332
if child["verified"]?.try &.as_bool
333-
author_name += "<i class=\"icon ion ion-md-checkmark-circle\"></i>"
333+
author_name += " <i class=\"icon ion ion-md-checkmark-circle\"></i>"
334334
end
335335
html << <<-END_HTML
336336
<div class="pure-g" style="width:100%">

src/invidious/views/channel.ecr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<div class="pure-u-2-3">
2121
<div class="channel-profile">
2222
<img src="/ggpht<%= URI.parse(channel.author_thumbnail).request_target %>">
23-
<span><%= author %></span><% if channel.verified %><i class="icon ion ion-md-checkmark-circle"></i><% end %>
23+
<span><%= author %></span><% if !channel.verified.nil? && channel.verified %> <i class="icon ion ion-md-checkmark-circle"></i><% end %>
2424
</div>
2525
</div>
2626
<div class="pure-u-1-3">

src/invidious/views/community.ecr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<div class="pure-u-2-3">
2020
<div class="channel-profile">
2121
<img src="/ggpht<%= URI.parse(channel.author_thumbnail).request_target %>">
22-
<span><%= author %></span><% if channel.verified %><i class="icon ion ion-md-checkmark-circle"></i><% end %>
22+
<span><%= author %></span><% if !channel.verified.nil? && channel.verified %> <i class="icon ion ion-md-checkmark-circle"></i><% end %>
2323
</div>
2424
</div>
2525
<div class="pure-u-1-3" style="text-align:right">

src/invidious/views/components/item.ecr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<img loading="lazy" style="width:56.25%" src="/ggpht<%= URI.parse(item.author_thumbnail).request_target.gsub(/=s\d+/, "=s176") %>"/>
99
</center>
1010
<% end %>
11-
<p dir="auto"><%= HTML.escape(item.author) %><% if !item.author_verified.nil? && item.author_verified %><i class="icon ion ion-md-checkmark-circle"></i><% end %></p>
11+
<p dir="auto"><%= HTML.escape(item.author) %><% if !item.author_verified.nil? && item.author_verified %> <i class="icon ion ion-md-checkmark-circle"></i><% end %></p>
1212
</a>
1313
<p><%= translate_count(locale, "generic_subscribers_count", item.subscriber_count, NumberFormatting::Separator) %></p>
1414
<% if !item.auto_generated %><p><%= translate_count(locale, "generic_videos_count", item.video_count, NumberFormatting::Separator) %></p><% end %>
@@ -30,7 +30,7 @@
3030
<p dir="auto"><%= HTML.escape(item.title) %></p>
3131
</a>
3232
<a href="/channel/<%= item.ucid %>">
33-
<p dir="auto"><b><%= HTML.escape(item.author) %><% if !item.is_a?(InvidiousPlaylist) && !item.author_verified.nil? && item.author_verified %><i class="icon ion ion-md-checkmark-circle"></i><% end %></b></p>
33+
<p dir="auto"><b><%= HTML.escape(item.author) %><% if !item.is_a?(InvidiousPlaylist) && !item.author_verified.nil? && item.author_verified %> <i class="icon ion ion-md-checkmark-circle"></i><% end %></b></p>
3434
</a>
3535
<% when MixVideo %>
3636
<a href="/watch?v=<%= item.id %>&list=<%= item.rdid %>">
@@ -45,7 +45,7 @@
4545
<p dir="auto"><%= HTML.escape(item.title) %></p>
4646
</a>
4747
<a href="/channel/<%= item.ucid %>">
48-
<p dir="auto"><b><%= HTML.escape(item.author) %><% if !item.is_a?(MixVideo) && !item.author_verified.nil? && item.author_verified %><i class="icon ion ion-md-checkmark-circle"></i><% end %></b></p>
48+
<p dir="auto"><b><%= HTML.escape(item.author) %><% if !item.is_a?(MixVideo) && !item.author_verified.nil? && item.author_verified %> <i class="icon ion ion-md-checkmark-circle"></i><% end %></b></p>
4949
</a>
5050
<% when PlaylistVideo %>
5151
<a style="width:100%" href="/watch?v=<%= item.id %>&list=<%= item.plid %>&index=<%= item.index %>">
@@ -142,7 +142,7 @@
142142

143143
<div class="video-card-row flexible">
144144
<div class="flex-left"><a href="/channel/<%= item.ucid %>">
145-
<p class="channel-name" dir="auto"><%= HTML.escape(item.author) %><% if !item.is_a?(ChannelVideo) && !item.author_verified.nil? && item.author_verified %><i class="icon ion ion-md-checkmark-circle"></i><% end %></p>
145+
<p class="channel-name" dir="auto"><%= HTML.escape(item.author) %><% if !item.is_a?(ChannelVideo) && !item.author_verified.nil? && item.author_verified %> <i class="icon ion ion-md-checkmark-circle"></i><% end %></p>
146146
</a></div>
147147

148148
<% endpoint_params = "?v=#{item.id}" %>

src/invidious/views/playlists.ecr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<div class="pure-u-2-3">
2020
<div class="channel-profile">
2121
<img src="/ggpht<%= URI.parse(channel.author_thumbnail).request_target %>">
22-
<span><%= author %></span><% if channel.verified %><i class="icon ion ion-md-checkmark-circle"></i><% end %>
22+
<span><%= author %></span><% if !channel.verified.nil? && channel.verified %> <i class="icon ion ion-md-checkmark-circle"></i><% end %>
2323
</div>
2424
</div>
2525
<div class="pure-u-1-3" style="text-align:right">

src/invidious/views/watch.ecr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ we're going to need to do it here in order to allow for translations.
240240
<% if !video.author_thumbnail.empty? %>
241241
<img src="/ggpht<%= URI.parse(video.author_thumbnail).request_target %>">
242242
<% end %>
243-
<span id="channel-name"><%= author %><% if video.author_verified %><i class="icon ion ion-md-checkmark-circle"></i><% end %></span>
243+
<span id="channel-name"><%= author %><% if !video.author_verified.nil? && video.author_verified %> <i class="icon ion ion-md-checkmark-circle"></i><% end %></span>
244244
</div>
245245
</a>
246246
@@ -314,9 +314,9 @@ we're going to need to do it here in order to allow for translations.
314314
<h5 class="pure-g">
315315
<div class="pure-u-14-24">
316316
<% if rv["ucid"]? %>
317-
<b style="width:100%"><a href="/channel/<%= rv["ucid"] %>"><%= rv["author"]? %><% if rv["author_verified"].== "true" %><i class="icon ion ion-md-checkmark-circle"></i><% end %></a></b>
317+
<b style="width:100%"><a href="/channel/<%= rv["ucid"] %>"><%= rv["author"]? %><% if rv["author_verified"]? == "true" %> <i class="icon ion ion-md-checkmark-circle"></i><% end %></a></b>
318318
<% else %>
319-
<b style="width:100%"><%= rv["author"]? %><% if rv["author_verified"].== "true" %><i class="icon ion ion-md-checkmark-circle"></i><% end %></b>
319+
<b style="width:100%"><%= rv["author"]? %><% if rv["author_verified"]? == "true" %> <i class="icon ion ion-md-checkmark-circle"></i><% end %></b>
320320
<% end %>
321321
</div>
322322

0 commit comments

Comments
 (0)