diff --git a/src/invidious/views/channel/about.ecr b/src/invidious/views/channel/about.ecr index a931121d..255ca441 100644 --- a/src/invidious/views/channel/about.ecr +++ b/src/invidious/views/channel/about.ecr @@ -12,8 +12,7 @@ <% end %> <% content_type = 5 %> -<% sort_options = Tuple.new %> -<%= rendered "components/channel-information" %> +<%= rendered "components/channels/channel-information" %>
diff --git a/src/invidious/views/channel/community.ecr b/src/invidious/views/channel/community.ecr index 28183f39..2146ede2 100644 --- a/src/invidious/views/channel/community.ecr +++ b/src/invidious/views/channel/community.ecr @@ -4,8 +4,7 @@ <% end %> <% content_type = 3 %> -<% sort_options = Tuple.new %> -<%= rendered "components/channel-information" %> +<%= rendered "components/channels/channel-information" %> <% if error_message %>
diff --git a/src/invidious/views/channel/featured_channels.ecr b/src/invidious/views/channel/featured_channels.ecr index 34ed2f17..2829c780 100644 --- a/src/invidious/views/channel/featured_channels.ecr +++ b/src/invidious/views/channel/featured_channels.ecr @@ -4,8 +4,7 @@ <% end %> <% content_type = 4 %> -<% sort_options = Tuple.new %> -<%= rendered "components/channel-information" %> +<%= rendered "components/channels/channel-information" %>
<% if !featured_channel_categories.empty? %> diff --git a/src/invidious/views/channel/home.ecr b/src/invidious/views/channel/home.ecr index 70c41a00..fccec803 100644 --- a/src/invidious/views/channel/home.ecr +++ b/src/invidious/views/channel/home.ecr @@ -4,8 +4,7 @@ <% end %> <% content_type = 0 %> -<% sort_options = Tuple.new %> -<%= rendered "components/channel-information" %> +<%= rendered "components/channels/channel-information" %>
<% items.each do | section | %> diff --git a/src/invidious/views/channel/playlists.ecr b/src/invidious/views/channel/playlists.ecr index 4883666f..6b1d7047 100644 --- a/src/invidious/views/channel/playlists.ecr +++ b/src/invidious/views/channel/playlists.ecr @@ -4,7 +4,8 @@ <% end %> <% content_type = 2 %> -<%= rendered "components/channel-information" %> +<%= rendered "components/channels/channel-information" %> +<%= rendered "components/channels/content-sorting-bar" %>
<% items.each_slice(4) do |slice| %> diff --git a/src/invidious/views/channel/videos.ecr b/src/invidious/views/channel/videos.ecr index 1f0aece9..2bda19f8 100644 --- a/src/invidious/views/channel/videos.ecr +++ b/src/invidious/views/channel/videos.ecr @@ -5,7 +5,8 @@ <% end %> <% content_type = 1 %> -<%= rendered "components/channel-information" %> +<%= rendered "components/channels/channel-information" %> +<%= rendered "components/channels/content-sorting-bar" %>
<% items.each_slice(4) do |slice| %> 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 3432f7ca..435c27fe 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 0e14a7c5..36fd612c 100644 --- a/src/invidious/views/search.ecr +++ b/src/invidious/views/search.ecr @@ -12,7 +12,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 %> <% if count == 0 %>