From 4a095eb98ef9f3d819d2561877f3ed127a767d71 Mon Sep 17 00:00:00 2001 From: syeopite Date: Sat, 15 May 2021 23:01:21 -0700 Subject: [PATCH] Fix
styling on empty search page --- src/invidious/routes/preferences.cr | 56 ++++++++++++++--------------- src/invidious/views/search.ecr | 6 +++- 2 files changed, 33 insertions(+), 29 deletions(-) diff --git a/src/invidious/routes/preferences.cr b/src/invidious/routes/preferences.cr index 20f68aea..d6002ffd 100644 --- a/src/invidious/routes/preferences.cr +++ b/src/invidious/routes/preferences.cr @@ -126,35 +126,35 @@ class Invidious::Routes::PreferencesRoute < Invidious::Routes::BaseRoute # Convert to JSON and back again to take advantage of converters used for compatability preferences = Preferences.from_json({ - annotations: annotations, - annotations_subscribed: annotations_subscribed, - autoplay: autoplay, - captions: captions, - comments: comments, - continue: continue, - continue_autoplay: continue_autoplay, - dark_mode: dark_mode, - latest_only: latest_only, - listen: listen, - local: local, - locale: locale, - max_results: max_results, - notifications_only: notifications_only, - player_style: player_style, - quality: quality, - quality_dash: quality_dash, - default_home: default_home, - feed_menu: feed_menu, + annotations: annotations, + annotations_subscribed: annotations_subscribed, + autoplay: autoplay, + captions: captions, + comments: comments, + continue: continue, + continue_autoplay: continue_autoplay, + dark_mode: dark_mode, + latest_only: latest_only, + listen: listen, + local: local, + locale: locale, + max_results: max_results, + notifications_only: notifications_only, + player_style: player_style, + quality: quality, + quality_dash: quality_dash, + default_home: default_home, + feed_menu: feed_menu, automatic_instance_redirect: automatic_instance_redirect, - related_videos: related_videos, - sort: sort, - speed: speed, - thin_mode: thin_mode, - unseen_only: unseen_only, - video_loop: video_loop, - volume: volume, - extend_desc: extend_desc, - vr_mode: vr_mode, + related_videos: related_videos, + sort: sort, + speed: speed, + thin_mode: thin_mode, + unseen_only: unseen_only, + video_loop: video_loop, + volume: volume, + extend_desc: extend_desc, + vr_mode: vr_mode, }.to_json).to_json if user = env.get? "user" diff --git a/src/invidious/views/search.ecr b/src/invidious/views/search.ecr index f5e3e39b..15389dce 100644 --- a/src/invidious/views/search.ecr +++ b/src/invidious/views/search.ecr @@ -96,7 +96,11 @@ <% end %> -
+<% if count == 0 %> +
+<% else %> +
+<% end %>