diff --git a/assets/css/default.css b/assets/css/default.css index c238835f..910a8fed 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -760,6 +760,10 @@ h1, h2, h3, h4, h5, p, margin: 0 2px; } +/* + * Compilations + */ + input.compilation-video-timestamp { width: 50px; height: 20px; diff --git a/src/invidious/views/components/item.ecr b/src/invidious/views/components/item.ecr index 57115b8f..b0f50fe2 100644 --- a/src/invidious/views/components/item.ecr +++ b/src/invidious/views/components/item.ecr @@ -87,93 +87,6 @@

- <% when InvidiousCompilation %> - <% url = "/compilation?list=#{item.id}" %> - - <% if !env.get("preferences").as(Preferences).thin_mode %> -
- " alt="" /> -

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

-
- <% end %> -

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

-
- -

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

-
- <% when CompilationVideo %> -
- -
- <% when PlaylistVideo %> - - <% if !env.get("preferences").as(Preferences).thin_mode %> -
- - - <% if plid_form = env.get?("remove_playlist_items") %> -
" method="post"> - "> -

- -

-
- <% 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 %> -
- <% end %> -

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

-
- -
-
-

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

-
- <% endpoint_params = "?v=#{item.id}&list=#{item.plid}" %> - <%= rendered "components/video-context-buttons" %> -
- -
-
- <% if item.responds_to?(:premiere_timestamp) && item.premiere_timestamp.try &.> Time.utc %> -

<%= 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 %> -
- - <% if item.responds_to?(:views) && item.views %> -
-

<%= translate_count(locale, "generic_views_count", item.views || 0, NumberFormatting::Short) %>

-
- <% end %> -
<% when Category %> <% else %> <%- @@ -184,6 +97,42 @@ elsif item.is_a?(MixVideo) link_url = "/watch?v=#{item.id}&list=#{item.rdid}" endpoint_params = "?v=#{item.id}&list=#{item.rdid}" + elsif item.is_a?(InvidiousCompilation) + <% when InvidiousCompilation %> + <% url = "/compilation?list=#{item.id}" %> + + <% if !env.get("preferences").as(Preferences).thin_mode %> +
+ " alt="" /> +

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

+
+ <% end %> +

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

+ elsif item.is_a?(CompilationVideo) + <% when CompilationVideo %> +
+ +
+
+ +

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

+
else link_url = "/watch?v=#{item.id}" endpoint_params = "?v=#{item.id}" @@ -223,12 +172,12 @@ data-onclick="add_playlist_item" data-id="<%= item.id %>" data-plid="<%= plid_form %>"> <% elsif compid_form = env.get? "add_compilation_items" %> -
" method="post"> - "> -

- -

-
+
" method="post"> + "> +

+ +

+
<%- elsif item.is_a?(PlaylistVideo) && (plid_form = env.get?("remove_playlist_items")) -%> <%- form_parameters = "action_remove_video=1&set_video_id=#{item.index}&playlist_id=#{plid_form}&referer=#{env.get("current_page")}" -%>