diff --git a/src/invidious/views/components/item.ecr b/src/invidious/views/components/item.ecr index 469dd230..484a340f 100644 --- a/src/invidious/views/components/item.ecr +++ b/src/invidious/views/components/item.ecr @@ -68,16 +68,19 @@ <%= item.author %>

- <% if item.responds_to?(:premiere_timestamp) && item.premiere_timestamp && item.premiere_timestamp.not_nil! > Time.now %> -
<%= translate(locale, "Premieres in `x`", recode_date((item.premiere_timestamp.as(Time) - Time.now).ago, locale)) %>
- <% elsif Time.now - item.published > 1.minute %>
-
<%= translate(locale, "Shared `x` ago", recode_date(item.published, locale)) %>
+ <% if item.responds_to?(:premiere_timestamp) && item.premiere_timestamp && item.premiere_timestamp.not_nil! > Time.now %> + <%= translate(locale, "Premieres in `x`", recode_date((item.premiere_timestamp.as(Time) - Time.now).ago, locale)) %>
+ <% elsif Time.now - item.published > 1.minute %> +
<%= translate(locale, "Shared `x` ago", recode_date(item.published, locale)) %>
+ <% else %> +
+ <% end %> +
<%= item.responds_to?(:views) ? translate(locale, "`x` views", number_to_short_text(item.views)) : "" %>
- <% end %> <% else %> <% if env.get("preferences").as(Preferences).thin_mode %> <% else %> @@ -112,16 +115,19 @@ <%= item.author %>

- <% if item.responds_to?(:premiere_timestamp) && item.premiere_timestamp && item.premiere_timestamp.not_nil! > Time.now %> -
<%= translate(locale, "Premieres in `x`", recode_date((item.premiere_timestamp.as(Time) - Time.now).ago, locale)) %>
- <% elsif Time.now - item.published > 1.minute %>
-
<%= translate(locale, "Shared `x` ago", recode_date(item.published, locale)) %>
+ <% if item.responds_to?(:premiere_timestamp) && item.premiere_timestamp && item.premiere_timestamp.not_nil! > Time.now %> + <%= translate(locale, "Premieres in `x`", recode_date((item.premiere_timestamp.as(Time) - Time.now).ago, locale)) %>
+ <% elsif Time.now - item.published > 1.minute %> +
<%= translate(locale, "Shared `x` ago", recode_date(item.published, locale)) %>
+ <% else %> +
+ <% end %> +
<%= item.responds_to?(:views) ? translate(locale, "`x` views", number_to_short_text(item.views)) : "" %>
- <% end %> <% end %>