From 65f22b42bf8b26105debcccaae1169865f201d75 Mon Sep 17 00:00:00 2001 From: syeopite Date: Sat, 26 Jun 2021 19:12:44 -0700 Subject: [PATCH] Add msg to warn users about empty vid and pl tab (cherry picked from commit 0a744d7cfad845fdfe5d70453267cc81a44b7f27) --- locales/en-US.json | 7 ++++++- src/invidious/views/channel/channel.ecr | 9 ++++++++- src/invidious/views/channel/playlists.ecr | 9 ++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/locales/en-US.json b/locales/en-US.json index e7765e2b..f712b9ae 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -436,7 +436,12 @@ "footer_modfied_source_code": "Modified Source code", "adminprefs_modified_source_code_url_label": "URL to modified source code repository", "channel_about_page_details_section_header": "Details", + "channel_about_page_details_country_label: ": "Country: ", "channel_about_page_stats_section_header": "Stats", "channel_about_page_stats_joined_label": "Joined", - "channel_about_page_links_section_header": "Links" + "channel_about_page_links_section_header": "Links", + "This channel doesn't feature any other channels.": "This channel doesn't feature any other channels.", + "This channel doesn't have any content.": "This channel doesn't have any content.", + "This channel has no videos.": "This channel has no videos.", + "This channel has no playlists.": "This channel has no playlists." } diff --git a/src/invidious/views/channel/channel.ecr b/src/invidious/views/channel/channel.ecr index daf4cd60..7a61acef 100644 --- a/src/invidious/views/channel/channel.ecr +++ b/src/invidious/views/channel/channel.ecr @@ -6,7 +6,14 @@ <% content_type = 1 %> <%= rendered "components/channels/channel-information" %> -<%= rendered "components/channels/content-sorting-bar" %> + +<% if count.not_nil! > 0 %> + <%= rendered "components/channels/content-sorting-bar" %> +<% else %> +

+ <%= translate(locale, "This channel has no videos.")%> +

+<% end %>
<% items.each do |item| %> diff --git a/src/invidious/views/channel/playlists.ecr b/src/invidious/views/channel/playlists.ecr index 1dab8f50..99732977 100644 --- a/src/invidious/views/channel/playlists.ecr +++ b/src/invidious/views/channel/playlists.ecr @@ -5,7 +5,14 @@ <% content_type = 2 %> <%= rendered "components/channels/channel-information" %> -<%= rendered "components/channels/content-sorting-bar" %> + +<% if items.size > 0 %> + <%= rendered "components/channels/content-sorting-bar" %> +<% else %> +

+ <%= translate(locale, "This channel has no playlists.")%> +

+<% end %>
<% items.each do |item| %>