diff options
| author | Samantaz Fox <coding@samantaz.fr> | 2022-12-03 22:39:24 +0100 |
|---|---|---|
| committer | Samantaz Fox <coding@samantaz.fr> | 2022-12-04 15:31:50 +0100 |
| commit | 9588fcb5d1dd90e8591ed53a342727a0df6923c4 (patch) | |
| tree | 1902d42a631f5f8a429ba9c4841ac3d66001d9f2 /src | |
| parent | fbcce57ce29b05c234c0c31b5f179d861e143260 (diff) | |
| download | invidious-9588fcb5d1dd90e8591ed53a342727a0df6923c4.tar.gz invidious-9588fcb5d1dd90e8591ed53a342727a0df6923c4.tar.bz2 invidious-9588fcb5d1dd90e8591ed53a342727a0df6923c4.zip | |
frontend: remove paging on channel videos
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/routes/channels.cr | 5 | ||||
| -rw-r--r-- | src/invidious/views/channel.ecr | 18 |
2 files changed, 4 insertions, 19 deletions
diff --git a/src/invidious/routes/channels.cr b/src/invidious/routes/channels.cr index c6e02cbd..f26f29f5 100644 --- a/src/invidious/routes/channels.cr +++ b/src/invidious/routes/channels.cr @@ -12,9 +12,6 @@ module Invidious::Routes::Channels end 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 if channel.auto_generated @@ -35,7 +32,7 @@ module Invidious::Routes::Channels sort_options = {"newest", "oldest", "popular"} 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 templated "channel" diff --git a/src/invidious/views/channel.ecr b/src/invidious/views/channel.ecr index dea86abe..878587d4 100644 --- a/src/invidious/views/channel.ecr +++ b/src/invidious/views/channel.ecr @@ -90,7 +90,7 @@ <% if sort_by == sort %> <b><%= translate(locale, sort) %></b> <% else %> - <a href="/channel/<%= ucid %>?page=<%= page %>&sort_by=<%= sort %>"> + <a href="/channel/<%= ucid %>?sort_by=<%= sort %>"> <%= translate(locale, sort) %> </a> <% end %> @@ -111,19 +111,7 @@ </div> <div class="pure-g h-box"> - <div class="pure-u-1 pure-u-lg-1-5"> - <% 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-1-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"> - <% 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 class="pure-u-1 pure-u-lg-1-5"></div> </div> |
