mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
frontend: remove paging on channel videos
This commit is contained in:
parent
fbcce57ce2
commit
9588fcb5d1
2 changed files with 4 additions and 19 deletions
|
@ -12,9 +12,6 @@ module Invidious::Routes::Channels
|
||||||
end
|
end
|
||||||
locale, user, subscriptions, continuation, ucid, channel = data
|
locale, user, subscriptions, continuation, ucid, channel = data
|
||||||
|
|
||||||
page = env.params.query["page"]?.try &.to_i?
|
|
||||||
page ||= 1
|
|
||||||
|
|
||||||
sort_by = env.params.query["sort_by"]?.try &.downcase
|
sort_by = env.params.query["sort_by"]?.try &.downcase
|
||||||
|
|
||||||
if channel.auto_generated
|
if channel.auto_generated
|
||||||
|
@ -35,7 +32,7 @@ module Invidious::Routes::Channels
|
||||||
sort_options = {"newest", "oldest", "popular"}
|
sort_options = {"newest", "oldest", "popular"}
|
||||||
sort_by ||= "newest"
|
sort_by ||= "newest"
|
||||||
|
|
||||||
count, items = get_60_videos(channel.ucid, channel.author, page, channel.auto_generated, sort_by)
|
count, items = get_60_videos(channel.ucid, channel.author, 1, channel.auto_generated, sort_by)
|
||||||
end
|
end
|
||||||
|
|
||||||
templated "channel"
|
templated "channel"
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
<% if sort_by == sort %>
|
<% if sort_by == sort %>
|
||||||
<b><%= translate(locale, sort) %></b>
|
<b><%= translate(locale, sort) %></b>
|
||||||
<% else %>
|
<% else %>
|
||||||
<a href="/channel/<%= ucid %>?page=<%= page %>&sort_by=<%= sort %>">
|
<a href="/channel/<%= ucid %>?sort_by=<%= sort %>">
|
||||||
<%= translate(locale, sort) %>
|
<%= translate(locale, sort) %>
|
||||||
</a>
|
</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -111,19 +111,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-g h-box">
|
<div class="pure-g h-box">
|
||||||
<div class="pure-u-1 pure-u-lg-1-5">
|
<div class="pure-u-1 pure-u-lg-1-5"></div>
|
||||||
<% if page > 1 %>
|
|
||||||
<a href="/channel/<%= ucid %>?page=<%= page - 1 %><% if sort_by != "newest" %>&sort_by=<%= URI.encode_www_form(sort_by) %><% end %>">
|
|
||||||
<%= translate(locale, "Previous page") %>
|
|
||||||
</a>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<div class="pure-u-1 pure-u-lg-3-5"></div>
|
<div class="pure-u-1 pure-u-lg-3-5"></div>
|
||||||
<div class="pure-u-1 pure-u-lg-1-5" style="text-align:right">
|
<div class="pure-u-1 pure-u-lg-1-5"></div>
|
||||||
<% if count == 60 %>
|
|
||||||
<a href="/channel/<%= ucid %>?page=<%= page + 1 %><% if sort_by != "newest" %>&sort_by=<%= URI.encode_www_form(sort_by) %><% end %>">
|
|
||||||
<%= translate(locale, "Next page") %>
|
|
||||||
</a>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue