<%= HTML.escape(item.author) %><% if !item.author_verified.nil? && item.author_verified %> <% end %>
@@ -25,7 +25,7 @@ <% if !env.get("preferences").as(Preferences).thin_mode %><%= translate_count(locale, "generic_videos_count", item.video_count, NumberFormatting::Separator) %>
+
<% if item.length_seconds != 0 %>
<%= recode_length_seconds(item.length_seconds) %>
<% end %> @@ -54,104 +54,79 @@<%= HTML.escape(item.author) %>
- <% when PlaylistVideo %> - - <% if !env.get("preferences").as(Preferences).thin_mode %> -
-
- <% if plid_form = env.get?("remove_playlist_items") %>
-
- <% end %>
-
- <% if item.responds_to?(:live_now) && item.live_now %>
- <%= translate(locale, "LIVE") %>
- <% elsif item.length_seconds != 0 %> -<%= recode_length_seconds(item.length_seconds) %>
- <% end %> - - <% if item_watched %> - - - <% end %> -<%= HTML.escape(item.title) %>
- - -<%= translate(locale, "Premieres in `x`", recode_date((item.premiere_timestamp.as(Time) - Time.utc).ago, locale)) %>
- <% elsif Time.utc - item.published > 1.minute %> -<%= translate(locale, "Shared `x` ago", recode_date(item.published, locale)) %>
- <% end %> -<%= translate_count(locale, "generic_views_count", item.views || 0, NumberFormatting::Short) %>
-
- <% if env.get? "show_watched" %>
-
- <% elsif plid_form = env.get? "add_playlist_items" %>
-
- <% end %>
+ <%-
+ # `endpoint_params` is used for the "video-context-buttons" component
+ if item.is_a?(PlaylistVideo)
+ link_url = "/watch?v=#{item.id}&list=#{item.plid}&index=#{item.index}"
+ endpoint_params = "?v=#{item.id}&list=#{item.plid}"
+ else
+ link_url = "/watch?v=#{item.id}"
+ endpoint_params = "?v=#{item.id}"
+ end
+ -%>
- <% if item.responds_to?(:live_now) && item.live_now %>
- <%= translate(locale, "LIVE") %>
- <% elsif item.length_seconds != 0 %> -<%= recode_length_seconds(item.length_seconds) %>
- <% end %> +
+
+ <%- end -%>
- <% if item_watched %>
-
-
- <% end %>
- <%= HTML.escape(item.title) %>
- +
+
+