From 8bd4e8026fcbad8d9e475cec9ee9b02e35118bef Mon Sep 17 00:00:00 2001 From: syeopite Date: Sat, 26 Jun 2021 19:39:30 -0700 Subject: [PATCH] Set query as an alias for search query in search --- src/invidious/routes/search.cr | 1 + src/invidious/views/search.ecr | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/invidious/routes/search.cr b/src/invidious/routes/search.cr index 5724d5f1..71d825f8 100644 --- a/src/invidious/routes/search.cr +++ b/src/invidious/routes/search.cr @@ -42,6 +42,7 @@ module Invidious::Routes::Search query = env.params.query["search_query"]? query ||= env.params.query["q"]? + query ||= env.params.query["query"]? if !query || query.empty? # Display the full page search box implemented in #1977 diff --git a/src/invidious/views/search.ecr b/src/invidious/views/search.ecr index 5b348de3..491a65dd 100644 --- a/src/invidious/views/search.ecr +++ b/src/invidious/views/search.ecr @@ -1,4 +1,5 @@ <% is_channel_search = operators.fetch("channel", false) && channel.is_a? AboutChannel && !subscriptions.nil?%> +<% filter_params = nil %> <% content_for "header" do %> @@ -25,6 +26,7 @@ <% end %> <% if is_channel_search %> + <% filter_params = "&channel=#{operators.fetch("channel", "")}" %> <% else %> <%= rendered "components/search-filters/search-filters" %> <% end %> @@ -39,7 +41,7 @@
<% if page > 1 %> - + <%= translate(locale, "Previous page") %> <% end %> @@ -47,7 +49,7 @@
<% if count >= 20 %> - + <%= translate(locale, "Next page") %> <% end %> @@ -65,7 +67,7 @@
<% if page > 1 %> - + <%= translate(locale, "Previous page") %> <% end %> @@ -73,7 +75,7 @@
<% if count >= 20 %> - + <%= translate(locale, "Next page") %> <% end %>