diff --git a/src/invidious/views/channel/about.ecr b/src/invidious/views/channel/about.ecr index d4ce827a..1c0331e2 100644 --- a/src/invidious/views/channel/about.ecr +++ b/src/invidious/views/channel/about.ecr @@ -3,9 +3,8 @@ <% end %> -<% content_type = 4 %> -<% sort_options = Tuple.new %> -<%= rendered "components/channel-information" %> +<% content_type = 5 %> +<%= rendered "components/channels/channel-information" %>
<% stats_style_append = ""%> diff --git a/src/invidious/views/channel/channel.ecr b/src/invidious/views/channel/channel.ecr index 7861ae5b..daf4cd60 100644 --- a/src/invidious/views/channel/channel.ecr +++ b/src/invidious/views/channel/channel.ecr @@ -4,8 +4,9 @@ <% end %> -<% content_type = 0 %> -<%= rendered "components/channel-information" %> +<% content_type = 1 %> +<%= rendered "components/channels/channel-information" %> +<%= rendered "components/channels/content-sorting-bar" %>
<% items.each do |item| %> diff --git a/src/invidious/views/channel/community.ecr b/src/invidious/views/channel/community.ecr index 3cbc346a..3bb778e8 100644 --- a/src/invidious/views/channel/community.ecr +++ b/src/invidious/views/channel/community.ecr @@ -3,9 +3,8 @@ <% end %> -<% content_type = 2 %> -<% sort_options = Tuple.new %> -<%= rendered "components/channel-information" %> +<% content_type = 3 %> +<%= rendered "components/channels/channel-information" %> <% if error_message %>
diff --git a/src/invidious/views/channel/playlists.ecr b/src/invidious/views/channel/playlists.ecr index 920b2b15..1dab8f50 100644 --- a/src/invidious/views/channel/playlists.ecr +++ b/src/invidious/views/channel/playlists.ecr @@ -3,8 +3,9 @@ <% end %> -<% content_type = 1 %> -<%= rendered "components/channel-information" %> +<% content_type = 2 %> +<%= rendered "components/channels/channel-information" %> +<%= rendered "components/channels/content-sorting-bar" %>
<% items.each do |item| %> diff --git a/src/invidious/views/components/channel-information.ecr b/src/invidious/views/components/channels/channel-information.ecr similarity index 85% rename from src/invidious/views/components/channel-information.ecr rename to src/invidious/views/components/channels/channel-information.ecr index 1e7a2881..19b24d08 100644 --- a/src/invidious/views/components/channel-information.ecr +++ b/src/invidious/views/components/channels/channel-information.ecr @@ -173,31 +173,5 @@
- <% if content_type == 1 || content_type == 2 %> - <% # We really only need a single
(handled below) outside of content_type 1 or 2 %> -
- <% route = content_type == 1 ? "/videos" : "/playlists" %> - <% url = "/channel/#{channel.ucid + route}" %> - -
- -
- <% end %>
\ No newline at end of file diff --git a/src/invidious/views/components/channels/content-sorting-bar.ecr b/src/invidious/views/components/channels/content-sorting-bar.ecr new file mode 100644 index 00000000..a3a51ab8 --- /dev/null +++ b/src/invidious/views/components/channels/content-sorting-bar.ecr @@ -0,0 +1,27 @@ + +
+ <% route = content_type == 1 ? "/videos" : "/playlists" %> + <% url = "/channel/#{channel.ucid + route}" %> + +
+ +
+ +
+
\ No newline at end of file diff --git a/src/invidious/views/search.ecr b/src/invidious/views/search.ecr index d08395e9..548838b3 100644 --- a/src/invidious/views/search.ecr +++ b/src/invidious/views/search.ecr @@ -13,7 +13,7 @@ <% if is_channel_search && channel.is_a? AboutChannel && !subscriptions.nil? %> <% content_type = 7 %> <% sort_options = Tuple.new %> - <%= rendered "components/channel-information" %> + <%= rendered "components/channels/channel-information" %> <% end %> <% search_query_encoded = env.get?("search").try { |x| URI.encode_www_form(x.as(String), space_to_plus: true) } %>