diff --git a/locales/en-US.json b/locales/en-US.json index a1e39777..613a459d 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -384,6 +384,7 @@ "Download": "Download", "Download as: ": "Download as: ", "%A %B %-d, %Y": "%A %B %-d, %Y", + "%B %-d, %Y": "%B %-d, %Y", "(edited)": "(edited)", "YouTube comment permalink": "YouTube comment permalink", "permalink": "permalink", @@ -423,5 +424,9 @@ "Current version: ": "Current version: ", "next_steps_error_message": "After which you should try to: ", "next_steps_error_message_refresh": "Refresh", - "next_steps_error_message_go_to_youtube": "Go to YouTube" + "next_steps_error_message_go_to_youtube": "Go to YouTube", + "Details": "Details", + "Stats": "Stats", + "Joined": "Joined", + "Links": "Links", } diff --git a/src/invidious/routes/channels.cr b/src/invidious/routes/channels.cr index c11833d2..3930c1fb 100644 --- a/src/invidious/routes/channels.cr +++ b/src/invidious/routes/channels.cr @@ -98,8 +98,18 @@ module Invidious::Routes::Channels end locale, user, subscriptions, continuation, ucid, channel = data - env.redirect "/channel/#{ucid}" - end + ucid = env.params.url["ucid"] + continuation = env.params.query["continuation"]? + + begin + channel = get_about_info(ucid, locale) + rescue ex : ChannelRedirect + next env.redirect env.request.resource.gsub(ucid, ex.channel_id) + rescue ex + next error_template(500, ex) + end + + templated "channel_about" end # Redirects brand url channels to a normal /channel/:ucid route def self.brand_redirect(env) diff --git a/src/invidious/views/channel_about.ecr b/src/invidious/views/channel_about.ecr new file mode 100644 index 00000000..8272c1ea --- /dev/null +++ b/src/invidious/views/channel_about.ecr @@ -0,0 +1,35 @@ +<% content_type = 4 %> +<% sort_options = Tuple.new %> +<%= rendered "components/channel-information" %> + +
Country: <%=channel.country%>
+<%= translate(locale, "Joined") %> + +
+<%= channel.total_views ? translate(locale, "`x` views", number_with_separator(channel.total_views || 0)) : "" %>
+