mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-29 19:11:23 +00:00
Added a previous_page_button preference option and made switching between the first page and previous page buttons possible
This commit is contained in:
@@ -21,7 +21,8 @@
|
||||
page_nav_html = IV::Frontend::Pagination.nav_ctoken(locale,
|
||||
base_url: relative_url,
|
||||
ctoken: next_continuation,
|
||||
first_page: continuation.nil?
|
||||
first_page: continuation.nil?,
|
||||
previous_page_button: env.get("preferences").as(Preferences).previous_page_button
|
||||
)
|
||||
%>
|
||||
|
||||
@@ -41,6 +42,10 @@
|
||||
<link rel="alternate" type="application/rss+xml" title="RSS" href="/feed/channel/<%= ucid %>" />
|
||||
<%- end -%>
|
||||
|
||||
<%- if env.get("preferences").as(Preferences).previous_page_button -%>
|
||||
<script src="/js/pagination.js?v=<%= ASSET_COMMIT %>"></script>
|
||||
<%- end -%>
|
||||
|
||||
<link rel="alternate" href="<%= youtube_url %>">
|
||||
<title><%= author %> - Invidious</title>
|
||||
<% end %>
|
||||
|
||||
@@ -8,4 +8,14 @@
|
||||
|
||||
<%= page_nav_html %>
|
||||
|
||||
<script id="pagination-data" type="application/json">
|
||||
<%=
|
||||
{
|
||||
"next_page" => translate(locale, "Next page"),
|
||||
"prev_page" => translate(locale, "Previous page"),
|
||||
"is_rtl" => locale_is_rtl?(locale)
|
||||
}.to_json
|
||||
%>
|
||||
</script>
|
||||
|
||||
<script src="/js/watched_indicator.js"></script>
|
||||
|
||||
@@ -189,6 +189,12 @@
|
||||
</select>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="previous_page_button"><%= translate(locale, "preferences_previous_page_button_label") %></label>
|
||||
<input name="previous_page_button" id="previous_page_button" type="checkbox" <% if preferences.previous_page_button %>checked<% end %>>
|
||||
</div>
|
||||
|
||||
<% if env.get? "user" %>
|
||||
<div class="pure-control-group">
|
||||
<label for="show_nick"><%= translate(locale, "preferences_show_nick_label") %></label>
|
||||
|
||||
Reference in New Issue
Block a user