mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
Merge 9148a78f99
into e319c35f09
This commit is contained in:
commit
5914090cae
3 changed files with 14 additions and 1 deletions
|
@ -496,5 +496,6 @@
|
||||||
"toggle_theme": "Toggle Theme",
|
"toggle_theme": "Toggle Theme",
|
||||||
"carousel_slide": "Slide {{current}} of {{total}}",
|
"carousel_slide": "Slide {{current}} of {{total}}",
|
||||||
"carousel_skip": "Skip the Carousel",
|
"carousel_skip": "Skip the Carousel",
|
||||||
"carousel_go_to": "Go to slide `x`"
|
"carousel_go_to": "Go to slide `x`",
|
||||||
|
"channel_has_no_posts": "This channel hasn't posted yet"
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,14 @@ def extract_channel_community(items, *, ucid, locale, format, thin_mode, is_sing
|
||||||
.try &.as_s || ""
|
.try &.as_s || ""
|
||||||
if error_message == "This channel does not exist."
|
if error_message == "This channel does not exist."
|
||||||
raise NotFoundException.new(error_message)
|
raise NotFoundException.new(error_message)
|
||||||
|
elsif error_message == "This channel hasn't posted yet"
|
||||||
|
response = JSON.build do |json|
|
||||||
|
json.object do
|
||||||
|
json.field "authorId", ucid
|
||||||
|
json.field "comments", json.array { }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return response
|
||||||
else
|
else
|
||||||
raise InfoException.new(error_message)
|
raise InfoException.new(error_message)
|
||||||
end
|
end
|
||||||
|
|
|
@ -25,6 +25,10 @@
|
||||||
<div class="h-box">
|
<div class="h-box">
|
||||||
<p><%= error_message %></p>
|
<p><%= error_message %></p>
|
||||||
</div>
|
</div>
|
||||||
|
<% elsif items.not_nil!["comments"].as_a.empty? %>
|
||||||
|
<div class="h-box">
|
||||||
|
<%= translate(locale, "channel_has_no_posts") %>
|
||||||
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="h-box pure-g comments" id="comments">
|
<div class="h-box pure-g comments" id="comments">
|
||||||
<%= IV::Frontend::Comments.template_youtube(items.not_nil!, locale, thin_mode) %>
|
<%= IV::Frontend::Comments.template_youtube(items.not_nil!, locale, thin_mode) %>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue